Copyright © (C) 2019-2022, Maxim Fedorov
Behaviours: gen_server.
format_duration/1 | Formats time duration, from nanoseconds to seconds Example: 88 -> 88 ns, 88000 -> 88 us, 10000000 -> 10 ms. |
format_number/1 | Formats number rounded to 3 digits. |
format_size/1 | Formats size (bytes) rounded to 3 digits. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
start_link/1 | Starts the server. |
format_duration(Num::non_neg_integer()) -> string()
Formats time duration, from nanoseconds to seconds Example: 88 -> 88 ns, 88000 -> 88 us, 10000000 -> 10 ms
format_number(Num::non_neg_integer()) -> string()
Formats number rounded to 3 digits. Example: 88 -> 88, 880000 -> 880 Ki, 100501 -> 101 Ki
format_size(Num::non_neg_integer()) -> string()
Formats size (bytes) rounded to 3 digits. Unlike @see format_number, used 1024 as a base, so 200 * 1024 is 200 Kb.
handle_call(Request, From, State) -> any()
handle_cast(Request, State) -> any()
handle_info(X1, State) -> any()
init(X1) -> any()
start_link(Filename::string() | file:io_device()) -> {ok, Pid::pid()} | {error, Reason::term()}
Starts the server
Generated by EDoc