diff options
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 8dc10cb..ac50fb9 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -297,8 +297,13 @@ floattime() #ifdef HAVE_GETTIMEOFDAY { struct timeval t; +#ifdef GETTIMEOFDAY_NO_TZ + if (gettimeofday(&t) == 0) + return (double)t.tv_sec + t.tv_usec*0.000001; +#else /* !GETTIMEOFDAY_NO_TZ */ if (gettimeofday(&t, (struct timezone *)NULL) == 0) return (double)t.tv_sec + t.tv_usec*0.000001; +#endif /* !GETTIMEOFDAY_NO_TZ */ } #endif /* !HAVE_GETTIMEOFDAY */ { |