Skip to content

Instantly share code, notes, and snippets.

@Neurogami
Created July 13, 2009 22:28
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 Neurogami/146499 to your computer and use it in GitHub Desktop.
Save Neurogami/146499 to your computer and use it in GitHub Desktop.
require 'time'
class Time
def seconds_since_midnight
s = hour * 60*60
s += min * 60
s += sec
end
end
t = Time.now
puts t.sec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment