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 | f0a1ba42c0789c0ed8ce4c6d75dd41a9969cc1ef (patch) | |
tree | 54fac5b90c2ce6664e7017d954add4d06e388a09 /time.c | |
parent | 3ed65cc170b2af485f59a8bc519f2569765906ca (diff) | |
download | ruby-f0a1ba42c0789c0ed8ce4c6d75dd41a9969cc1ef.tar.gz ruby-f0a1ba42c0789c0ed8ce4c6d75dd41a9969cc1ef.tar.xz ruby-f0a1ba42c0789c0ed8ce4c6d75dd41a9969cc1ef.zip |
matz
git-svn-id: http://svn.ruby-lang.org/repos/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; |