Commits

arkdro  committed 4ca1874

change now/0 to os:timestamp/0

  • Participants
  • Parent commits 8f33fd6

Comments (0)

Files changed (1)

File erlang/src/c_server.erl

                 from,
                 start,      %% start time of current command
                 count=0,    %% number of commands sent
-                duration=0  %% now()
+                duration=0  %% os:timestamp()
                }).
 
 -define(SERVER, ?MODULE).
     Key = crypto:rand_uniform(0, 1 bsl 32),
     Term = {self(), Key, Payload},
     {Proc, Node} ! Term,
-    State#state{start=now(), key=Key}.
+    State#state{start=os:timestamp(), key=Key}.
 
 %-------------------------------------------------------------------
 add_timing(#state{start=T1, count=Cnt, duration=Dur} = State) ->
-    T2 = now(),
+    T2 = os:timestamp(),
     D = timer:now_diff(T2, T1),
     State#state{start=undefined, count=Cnt+1, duration=Dur+D}.