Permalink
Browse files

Fix mega-seconds bug in toMicroSeconds() - by replacing with stdlib c…

…all.
  • Loading branch information...
1 parent 5fec62f commit 9343c8df6cc23780bc05d0447bcb34f74b8436c4 @esstrifork esstrifork committed Feb 8, 2012
Showing with 1 addition and 4 deletions.
  1. +1 −4 erlang/client.erl
View
@@ -71,9 +71,6 @@ print_results(Count,Size,Start,Finish) ->
io:format("Throughput=~p per sec~n",[throughput(Size,Start,Finish)]).
elapsedTime(Start,Finish) ->
- (toMicroSeconds(Finish) - toMicroSeconds(Start)) /1000000.
-
-toMicroSeconds({MegaSeconds,Seconds,MicroSeconds}) ->
- (MegaSeconds+Seconds) * 1000000 + MicroSeconds.
+ timer:now_diff(Finish, Start) / 1000000.
throughput(Size,Start,Finish) -> Size / elapsedTime(Start,Finish).

0 comments on commit 9343c8d

Please sign in to comment.