Skip to content

Instantly share code, notes, and snippets.

@argent-smith
Created August 25, 2011 14:35
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 argent-smith/1170803 to your computer and use it in GitHub Desktop.
Save argent-smith/1170803 to your computer and use it in GitHub Desktop.
Externap program execution stopwatch
#!/usr/bin/env ruby
EXTERNAL=ARGV.join " "
puts "Running #{EXTERNAL}"
t1 = Time.now
system EXTERNAL
t2 = Time.now
puts "Execution time: " + (t2 - t1).divmod(60).join("|")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment