diff options
author | Björn Gustavsson <[email protected]> | 2015-04-27 10:09:33 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-04-27 10:09:33 +0200 |
commit | 6f0a08d85feac7103b573e20d6250ea880c6400f (patch) | |
tree | 4becfa81c3f29e0c885c9ea722be2b5e76abdd88 /lib/stdlib/src/supervisor.erl | |
parent | 19c7d1f88c8d393ee6b9ba82b36389f01b5c0372 (diff) | |
parent | 47e7f00fe52ceb675c94a4800c297ce98d6bee30 (diff) | |
download | otp-6f0a08d85feac7103b573e20d6250ea880c6400f.tar.gz otp-6f0a08d85feac7103b573e20d6250ea880c6400f.tar.bz2 otp-6f0a08d85feac7103b573e20d6250ea880c6400f.zip |
Merge branch 'bjorn/use-monotonic-time'
* bjorn/use-monotonic-time:
supervisor: Correct restart handling
test_server: Use erlang:monotonic_time/0
compile: Teach 'time' option to show three significant decimals
timer: Use monotonic_time/0 in tc/1,2,3
Diffstat (limited to 'lib/stdlib/src/supervisor.erl')
-rw-r--r-- | lib/stdlib/src/supervisor.erl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl index 7c0cd8b26a..67655b1145 100644 --- a/lib/stdlib/src/supervisor.erl +++ b/lib/stdlib/src/supervisor.erl @@ -1403,13 +1403,8 @@ add_restart([R|Restarts], Now, Period) -> add_restart([], _, _) -> []. -inPeriod(Time, Now, Period) -> - case Time - Now of - T when T > Period -> - false; - _ -> - true - end. +inPeriod(Then, Now, Period) -> + Now =< Then + Period. %%% ------------------------------------------------------ %%% Error and progress reporting. |