diff options
author | Rickard Green <[email protected]> | 2016-08-30 16:25:00 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-08-30 16:25:00 +0200 |
commit | 925984e94f2c1933bb659dfb626c191982b7c8d4 (patch) | |
tree | d1c5bec6861970d2c7e0d8090d39d8e77c2d4616 /erts/emulator/test/long_timers_test.erl | |
parent | d419ca5917d4d27afe0518e5e5c444af5b11f480 (diff) | |
parent | fc85e401ee279cc3b69635a71ffa93544ce5b99d (diff) | |
download | otp-925984e94f2c1933bb659dfb626c191982b7c8d4.tar.gz otp-925984e94f2c1933bb659dfb626c191982b7c8d4.tar.bz2 otp-925984e94f2c1933bb659dfb626c191982b7c8d4.zip |
Merge branch 'rickard/time-unit/OTP-13735' into maint
* rickard/time-unit/OTP-13735:
Update test-cases to use new symbolic time units
Replace misspelled symbolic time units
Conflicts:
erts/doc/src/erlang.xml
erts/emulator/test/long_timers_test.erl
Diffstat (limited to 'erts/emulator/test/long_timers_test.erl')
-rw-r--r-- | erts/emulator/test/long_timers_test.erl | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/erts/emulator/test/long_timers_test.erl b/erts/emulator/test/long_timers_test.erl index 90efe1292c..c9a380a229 100644 --- a/erts/emulator/test/long_timers_test.erl +++ b/erts/emulator/test/long_timers_test.erl @@ -248,20 +248,20 @@ to_diff(Timeout, Start, Stop) -> (Stop - Start) - Timeout*1000. ms(Time) -> - erlang:convert_time_unit(Time, micro_seconds, milli_seconds). + erlang:convert_time_unit(Time, microsecond, millisecond). max_late() -> - erlang:convert_time_unit(?MAX_LATE_MS, milli_seconds, micro_seconds). + erlang:convert_time_unit(?MAX_LATE_MS, millisecond, microsecond). receive_after(Timeout) -> - Start = erlang:monotonic_time(micro_seconds), + Start = erlang:monotonic_time(microsecond), receive {get_result, ?REG_NAME} -> ?REG_NAME ! #timeout_rec{pid = self(), type = receive_after, timeout = Timeout} after Timeout -> - Stop = erlang:monotonic_time(micro_seconds), + Stop = erlang:monotonic_time(microsecond), receive {get_result, ?REG_NAME} -> ?REG_NAME ! #timeout_rec{pid = self(), @@ -276,7 +276,7 @@ receive_after(Timeout) -> driver(Timeout) -> Port = open_port({spawn, ?DRV_NAME},[]), link(Port), - Start = erlang:monotonic_time(micro_seconds), + Start = erlang:monotonic_time(microsecond), erlang:port_command(Port, <<?START_TIMER, Timeout:32>>), receive {get_result, ?REG_NAME} -> @@ -284,7 +284,7 @@ driver(Timeout) -> type = driver, timeout = Timeout}; {Port,{data,[?TIMER]}} -> - Stop = erlang:monotonic_time(micro_seconds), + Stop = erlang:monotonic_time(microsecond), unlink(Port), true = erlang:port_close(Port), receive @@ -299,7 +299,7 @@ driver(Timeout) -> end. bif_timer(Timeout) -> - Start = erlang:monotonic_time(micro_seconds), + Start = erlang:monotonic_time(microsecond), Tmr = erlang:start_timer(Timeout, self(), ok), receive {get_result, ?REG_NAME} -> @@ -307,7 +307,7 @@ bif_timer(Timeout) -> type = bif_timer, timeout = Timeout}; {timeout, Tmr, ok} -> - Stop = erlang:monotonic_time(micro_seconds), + Stop = erlang:monotonic_time(microsecond), receive {get_result, ?REG_NAME} -> ?REG_NAME ! #timeout_rec{pid = self(), @@ -335,7 +335,7 @@ test(Starter, DrvDir, StartDone) -> ok end, UtilData = new_util(), - Start = erlang:monotonic_time(micro_seconds), + Start = erlang:monotonic_time(microsecond), TORs = lists:map(fun (Min) -> TO = Min*60*1000, [#timeout_rec{pid = spawn_opt( @@ -370,13 +370,13 @@ new_util() -> new_util(UtilData) -> Util = cpu_sup:util(), - Time = erlang:monotonic_time(micro_seconds), + Time = erlang:monotonic_time(microsecond), [{Time, Util} | UtilData]. test_loop(TORs, Start, UtilData) -> receive {get_result, ?REG_NAME, Pid} -> - End = erlang:monotonic_time(micro_seconds), + End = erlang:monotonic_time(microsecond), EndUtilData = new_util(UtilData), Pid ! {result, ?REG_NAME, get_test_results(TORs), Start, End, EndUtilData}, erl_ddll:unload_driver(?DRV_NAME), |