Page 1 of 1

Timer() question

Posted: 06 February 2008, 4:02 AM
by victorf
SysLib has this to say about the Timer() function:

"This function returns the current RTC time represented as the number of seconds since midnight ..."

May I assume that the time really means "since power up" unless an effort has been made, somehow, to set the RTC to agree with watch time? If I capture Timer() time at power up and then wait 60 seconds will Timer() return 60.0?

Any enlightenment will be appreciated.

Vic

Re: Timer() question

Posted: 06 February 2008, 7:36 AM
by dkinzer
victorf wrote:May I assume that the time really means "since power up" unless an effort has been made, somehow, to set the RTC to agree with watch time?
When the ZX is reset or powered up, the RTC is initialized to midnight, January 1, 1999 and then it keeps track of the time relative to that. Unless you have a means to synchronize the ZX RTC with real time, it is really only useful for relative time notions.
victorf wrote:If I capture Timer() time at power up and then wait 60 seconds will Timer() return 60.0?
Exactly so.