Skip to content

Instantly share code, notes, and snippets.

@quamen
Created November 17, 2010 08:20
Show Gist options
  • Save quamen/703130 to your computer and use it in GitHub Desktop.
Save quamen/703130 to your computer and use it in GitHub Desktop.
Timing Code
-module (e21).
-compile (export_all).
ringBenchmark(NumberOfNodes, _Message, NumberOfLaps) ->
statistics(runtime),
statistics(wall_clock),
{_, Time1} = statistics(runtime),
{_, Time2} = statistics(wall_clock),
io:format("Sent ~p messages in time=~p (~p) milliseconds~n", [NumberOfLaps * NumberOfNodes, Time1, Time2]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment