diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-12-22 03:22:25 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-12-22 03:22:25 +0000 |
commit | 0e47c138c9bba4396fc7d956b05e5725000012f1 (patch) | |
tree | 54fac5b90c2ce6664e7017d954add4d06e388a09 /time.c | |
parent | 31c53aaa7dc3da8bc9ba6b3007c183dcbeeafe11 (diff) |
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -696,6 +696,10 @@ time_minus(time1, time2) sec = tobj->tv.tv_sec - sec; } + if (usec >= 1000000) { /* usec overflow */ + sec++; + usec -= 1000000; + } if (usec < 0) { /* usec underflow */ sec--; usec += 1000000; |