Skip to content

Instantly share code, notes, and snippets.

@argent-smith
Created August 25, 2011 14:35
Show Gist options
  • Select an option

  • Save argent-smith/1170803 to your computer and use it in GitHub Desktop.

Select an option

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