aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_test_lib.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/snmp/test/snmp_test_lib.erl')
-rw-r--r--lib/snmp/test/snmp_test_lib.erl15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/snmp/test/snmp_test_lib.erl b/lib/snmp/test/snmp_test_lib.erl
index 4973630ea2..33f7b89974 100644
--- a/lib/snmp/test/snmp_test_lib.erl
+++ b/lib/snmp/test/snmp_test_lib.erl
@@ -607,7 +607,8 @@ p(F, A) when is_list(F) andalso is_list(A) ->
%% This is just a bog standard printout, with a (formatted) timestamp
%% prefix and a newline after.
-%% print1 prints to both standard_�o and to user. print2 just to standard_�o.
+%% print1 - prints to both standard_io and user.
+%% print2 - prints to just standard_io.
print_format(F, A) ->
FTS = snmp_test_lib:formated_timestamp(),
@@ -629,13 +630,5 @@ print(Prefix, Module, Line, Format, Args) ->
Prefix, node(), self(), Module, Line|Args]).
formated_timestamp() ->
- format_timestamp(os:timestamp()).
-
-format_timestamp({_N1, _N2, N3} = Now) ->
- {Date, Time} = calendar:now_to_datetime(Now),
- {YYYY,MM,DD} = Date,
- {Hour,Min,Sec} = Time,
- FormatDate =
- io_lib:format("~.4w:~.2.0w:~.2.0w-~.2.0w:~.2.0w:~.2.0w.~w",
- [YYYY, MM, DD, Hour, Min, Sec, round(N3/1000)]),
- lists:flatten(FormatDate).
+ snmp_misc:formated_timestamp().
+