[ovs-dev] [PATCH v2] timeval: Initialize 'unix_epoch' for Windows correctly.
Ben Pfaff
blp at nicira.com
Thu Jul 3 19:54:30 UTC 2014
On Fri, Jun 27, 2014 at 09:50:24AM -0700, Gurucharan Shetty wrote:
> Till now, we were initializing 'unix_epoch' through time_init().
> But if there was a call directly to xgettimeofday(), we would
> miss the initialization causing overflows. This commit fixes it
> by pre-calculating the value and assigning it globally.
>
> Also add-in a missing return statement.
>
> Reported-by: Alessandro Pilotti <apilotti at cloudbasesolutions.com>
> Reported-by: Linda Sun <lsun at vmware.com>
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
> ---
> v1-v2:
> Instead of calculating the number of 100 ns between 01/01/1601 to
> 01/01/1970 runtime, pre-calculate it and initialize.
116444736000000000 is a very large number!
Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev
mailing list