mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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.
This commit is contained in:
parent
437a0e60ba
commit
3bbc62e9c2
18 changed files with 222 additions and 85 deletions
|
@ -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 */
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue