Trouble with OnTimer()

I am running a 1 second timer function but getting strange results - please see code and output.

int OnInit()
{
 EventSetTimer(1);

   return(INIT_SUCCEEDED);
}


void OnTimer()
{
 Print(TimeSeconds(TimeCurrent()));
}

Print results.


Why is there duplication of seconds?

I thought the OnTimer() function ran off the system clock?

thanks

sd59:

I am running a 1 second timer function but getting strange results - please see code and output.

Print results.


Why is there duplication of seconds?

I thought the OnTimer() function ran off the system clock?

thanks

So what is strange?

TimeCurrent() is showing the time of the last tick received from the broker.

Use TimeLocal() if you are looking after "regular" clock

Thanks - point taken.