Skip to content

Instantly share code, notes, and snippets.

@sponomarev
Created August 13, 2018 20:39
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 sponomarev/a910999e87304f7d5dc67821c39dfbf2 to your computer and use it in GitHub Desktop.
Save sponomarev/a910999e87304f7d5dc67821c39dfbf2 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'time'
start = Time.now
ARGF.read.each_line do |line|
now = Time.now
prev ||= now
$stdout.puts "#{now.iso8601} #{ now - start }s #{ now - prev }s #{line}"
prev = now
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment