Skip to content

Instantly share code, notes, and snippets.

@morganp
Created March 24, 2010 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morganp/342639 to your computer and use it in GitHub Desktop.
Save morganp/342639 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# Measure performance in seconds of tasks
# Record Startime For performance measurements
start_time = Time.now
#Main part of script goes here
#Calculate and Display Execution Time in seconds
exec_time = Time.now - start_time
puts "Execution time #{exec_time} seconds."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment