diff options
| author | Michael Klishin <mklishin@pivotal.io> | 2015-06-10 11:34:03 +0300 |
|---|---|---|
| committer | Michael Klishin <mklishin@pivotal.io> | 2015-06-10 11:34:03 +0300 |
| commit | 44f35f3693720f9e072b595d5aa5bb692dae1cd4 (patch) | |
| tree | 70ae82b99e3445653ed4e5d197a471c14a70d2b7 | |
| parent | 54ec4d41bb85db2afb8806032cbf93fa0c45fbf7 (diff) | |
| download | rabbitmq-server-git-44f35f3693720f9e072b595d5aa5bb692dae1cd4.tar.gz | |
Avoid float_to_list/2
Not available in older Erlang/OTP releases.
| -rw-r--r-- | src/rabbit_control_main.erl | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/rabbit_control_main.erl b/src/rabbit_control_main.erl index 82c8d80a98..5a0ce17441 100644 --- a/src/rabbit_control_main.erl +++ b/src/rabbit_control_main.erl @@ -212,14 +212,11 @@ parse_timeout(N) when is_list(N) -> parse_timeout(N) -> {ok, N}. -format_timeout(N) when is_number(N) -> - float_to_list(N / 1000, [{decimals, 0}]). - announce_timeout(infinity, _Inform) -> %% no-op ok; announce_timeout(Timeout, Inform) when is_number(Timeout) -> - Inform("Timeout: ~s seconds", [format_timeout(Timeout)]), + Inform("Timeout: ~w seconds", [Timeout/1000]), ok. stop() -> |
