mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (gettimeofday): easier calculation. use the definition
of the Gregorian calender. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2ede3bfee8
commit
7247d1a857
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Sep 2 10:49:18 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (gettimeofday): easier calculation. use the definition
|
||||
of the Gregorian calender.
|
||||
|
||||
Tue Sep 2 10:33:12 2008 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||
|
||||
* common.mk (distclean-golf): moved golf_prelude.c here from
|
||||
|
|
|
@ -3102,7 +3102,7 @@ gettimeofday(struct timeval *tv, struct timezone *tz)
|
|||
the first leap second is at 1972/06/30, so we doesn't need to think
|
||||
about it. */
|
||||
lt /= 10000; /* to msec */
|
||||
lt -= (LONG_LONG)(369 * 365 + 24 * 3 + 17) * 24 * 60 * 60 * 1000;
|
||||
lt -= (LONG_LONG)((1970-1601)*365.2425) * 24 * 60 * 60 * 1000;
|
||||
|
||||
tv->tv_sec = lt / 1000;
|
||||
tv->tv_usec = lt % 1000;
|
||||
|
|
Loading…
Reference in a new issue