diff options
author | Guido van Rossum <guido@python.org> | 1995-01-02 19:30:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-01-02 19:30:30 (GMT) |
commit | 3bbc62e9c25d4c006cd21d6b1314ccf0ba211382 (patch) | |
tree | 0b1a6d87c3bd250a62235f9df6ed9fffddbbabae /Modules/timemodule.c | |
parent | 437a0e60baa6eabc2c853bee7ce1543481db8ca7 (diff) | |
download | cpython-3bbc62e9c25d4c006cd21d6b1314ccf0ba211382.zip cpython-3bbc62e9c25d4c006cd21d6b1314ccf0ba211382.tar.gz cpython-3bbc62e9c25d4c006cd21d6b1314ccf0ba211382.tar.bz2 |
Another bulky set of minor changes.
Note addition of gethostbyaddr() and improved repr() for sockets,
renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
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 */ { |