Advertisement
Guest User

Untitled

a guest
Feb 10th, 2012
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.22 KB | None | 0 0
  1. @f = File.open("log.txt","a+")
  2. def start; @f.puts 'started at: '+(@t=Time.now).to_s end
  3. def lap; @f.puts 'passed: '+(Time.now-@t).to_s end
  4. def stop; lap;@f.close;'s' end
  5. while !(send($<.gets.chop.to_sym) rescue stop); end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement