|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hey there, I have asked this somewhere else but I will be asking here too:
How do I know how much time have passed since a time object? I want a way to know how many seconds have passed? Code:
$time = Time.now # I leave, and come back after 3 hours. # Now I want a method to return how much time have passed... # It should return "10800", the number of seconds passed. Thanks. |
|
#2
|
|||
|
|||
|
__________________
~~ Peter ~~ :: ( Who am I? ) :: ( My Blog: A day (or more) in the life of a CS & Math student... ) :: ( Supporter of the EFF & FSF ) :: ( I'm a GNU/Linux addict and Free Software Advocate. ) :: ( How to Ask Questions the Smart Way ) :: ( The Fedora Project, sponsored by Red Hat ) :: ( GNOME: The Free Software Desktop Project ) :: ( GnuPG Public Key ) :: ( About me on the WIki ) |
|
#3
|
|||
|
|||
|
Quote:
Of course, you would need to take the negative of that ![]() Code:
timeStop - timeStart would do the trick.
__________________
Some people have 20 years of experience. Some have 1 year of experience 20 times. My personal site: Basic geek randomness |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Ruby Programming > Time have passed. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|