Skip to content

Instantly share code, notes, and snippets.

@Neurogami
Created July 13, 2009 22:28
Show Gist options
  • 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