diff options
Diffstat (limited to 'source/blender/blenlib/intern/time.c')
-rw-r--r-- | source/blender/blenlib/intern/time.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/time.c b/source/blender/blenlib/intern/time.c index 078fc2c295b..a0fb78cd193 100644 --- a/source/blender/blenlib/intern/time.c +++ b/source/blender/blenlib/intern/time.c @@ -33,6 +33,9 @@ #include "PIL_time.h" #ifdef WIN32 + +#define _WIN32_WINNT 0x501 /* Windows XP or newer */ +#define WIN32_LEAN_AND_MEAN #include <windows.h> double PIL_check_seconds_timer(void) @@ -70,6 +73,11 @@ double PIL_check_seconds_timer(void) } } +long int PIL_check_seconds_timer_i(void) +{ + return (long int)PIL_check_seconds_timer(); +} + void PIL_sleep_ms(int ms) { Sleep(ms); @@ -90,6 +98,16 @@ double PIL_check_seconds_timer(void) return ((double) tv.tv_sec + tv.tv_usec / 1000000.0); } +long int PIL_check_seconds_timer_i(void) +{ + struct timeval tv; + struct timezone tz; + + gettimeofday(&tv, &tz); + + return tv.tv_sec; +} + void PIL_sleep_ms(int ms) { if (ms >= 1000) { |