• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

7. Advanced Techniques > 97. Calculate Elapsed Time

Calculate Elapsed Time

If you want to know how much time has passed between events, such as how long it has been since the rain sensor was activated, or how many hours it has been since the motion detector in the library last sent a command, this technique will give you an answer in human-readable format.

Computers tend to count the passing of time in seconds, not bothering with anything as silly as minutes, hours, days, weeks, months, and years. Ask your computer how long ago it was that you last turned on a particular light and it will dutifully report that the light was last touched 6,026 seconds ago, which is about 10 minutes in human time. We puny humans tend to have a hard time keeping track of anything more than around 59 seconds.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint