diff options
author | Fredrik Gustafsson <[email protected]> | 2013-04-19 10:53:35 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-04-19 10:53:35 +0200 |
commit | 3e71888762cf3254c7d0004a9c290cf4c71d0bce (patch) | |
tree | c4f222435a2085b966e7ab23e09474a19b15ff00 | |
parent | d99f028d441e20bbe09701808d4886f42d3495b6 (diff) | |
parent | b31b467e902c978284eaeca6a23e336d2301f42a (diff) | |
download | otp-3e71888762cf3254c7d0004a9c290cf4c71d0bce.tar.gz otp-3e71888762cf3254c7d0004a9c290cf4c71d0bce.tar.bz2 otp-3e71888762cf3254c7d0004a9c290cf4c71d0bce.zip |
Merge branch 'maint'
-rw-r--r-- | lib/stdlib/src/timer.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/src/timer.erl b/lib/stdlib/src/timer.erl index 689e42051f..e11fb046e9 100644 --- a/lib/stdlib/src/timer.erl +++ b/lib/stdlib/src/timer.erl @@ -354,7 +354,7 @@ timer_timeout(SysTime) -> '$end_of_table' -> infinity; {Time, _Ref} when Time > SysTime -> - Timeout = (Time - SysTime) div 1000, + Timeout = (Time - SysTime + 999) div 1000, %% Returned timeout must fit in a small int erlang:min(Timeout, ?MAX_TIMEOUT); Key -> @@ -414,7 +414,7 @@ next_timeout() -> '$end_of_table' -> infinity; {Time, _} -> - erlang:min(positive((Time - system_time()) div 1000), ?MAX_TIMEOUT) + erlang:min(positive((Time - system_time() + 999) div 1000), ?MAX_TIMEOUT) end. %% Help functions |