aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_compiler_test.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-01-19 15:52:15 +0100
committerMicael Karlberg <[email protected]>2012-01-19 15:52:15 +0100
commit4feb441edfe666ea926b11bb758d34c8b635466c (patch)
treec5e2dcc7117139bc1f0e11f01d186e7227035716 /lib/snmp/test/snmp_compiler_test.erl
parent11d255627033bb96e7c737d35badbacae32a8631 (diff)
parent5790c87a3c155dbe49b82a8f3b3b74f9fec9d71d (diff)
downloadotp-4feb441edfe666ea926b11bb758d34c8b635466c.tar.gz
otp-4feb441edfe666ea926b11bb758d34c8b635466c.tar.bz2
otp-4feb441edfe666ea926b11bb758d34c8b635466c.zip
Merge branch 'maint-r15' into maint
Diffstat (limited to 'lib/snmp/test/snmp_compiler_test.erl')
-rw-r--r--lib/snmp/test/snmp_compiler_test.erl15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/snmp/test/snmp_compiler_test.erl b/lib/snmp/test/snmp_compiler_test.erl
index c964b08168..0a147130b0 100644
--- a/lib/snmp/test/snmp_compiler_test.erl
+++ b/lib/snmp/test/snmp_compiler_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -566,14 +566,7 @@ p(F, A) ->
p(TName, F, A) ->
io:format("*** [~w][~s] ***"
- "~n" ++ F ++ "~n", [TName,format_timestamp(now())|A]).
-
-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 4~w",
- [YYYY,MM,DD,Hour,Min,Sec,round(N3/1000)]),
- lists:flatten(FormatDate).
+ "~n" ++ F ++ "~n", [TName, formated_timestamp()|A]).
+formated_timestamp() ->
+ snmp_test_lib:formated_timestamp().