X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Ftimeval.h;h=0bd74ccdeec7f75173199744c84f8fd05302d058;hb=HEAD;hp=99b3af04c4b348debb285670c659b2385c16a9c1;hpb=57e8d2bdc174cb24e2ae474ea805c7b7308d68a5;p=sliver-openvswitch.git diff --git a/lib/timeval.h b/lib/timeval.h index 99b3af04c..0bd74ccde 100644 --- a/lib/timeval.h +++ b/lib/timeval.h @@ -40,6 +40,11 @@ BUILD_ASSERT_DECL(TYPE_IS_SIGNED(time_t)); #define TIME_MAX TYPE_MAXIMUM(time_t) #define TIME_MIN TYPE_MINIMUM(time_t) +#ifdef _WIN32 +#define localtime_r(timep, result) localtime_s(result, timep) +#define gmtime_r(timep, result) gmtime_s(result, timep) +#endif /* _WIN32 */ + struct tm_msec { struct tm tm; int msec; @@ -52,8 +57,8 @@ long long int time_wall_msec(void); void time_timespec(struct timespec *); void time_wall_timespec(struct timespec *); void time_alarm(unsigned int secs); -int time_poll(struct pollfd *, int n_pollfds, long long int timeout_when, - int *elapsed); +int time_poll(struct pollfd *, int n_pollfds, HANDLE *handles, + long long int timeout_when, int *elapsed); long long int timespec_to_msec(const struct timespec *); long long int timeval_to_msec(const struct timeval *); @@ -69,6 +74,8 @@ int get_cpu_usage(void); long long int time_boot_msec(void); +void timewarp_wait(void); + #ifdef __cplusplus } #endif