Subj : MPL Timer Clarification
To   : All
From : LEE WESTLAKE
Date : Sat Jan 15 2022 11:40 am

Hi all,

It's me again; I have the distinct impression I'm becoming a nuisance :)

For the 'Timer' function, the MPL documentation states:

-----------------------------------------------------------------------------

Function TIMER : LongInt

 This function will return the current number of seconds which have passed
 since midnight. This function can be used to time how long a user is doing
 something.

-----------------------------------------------------------------------------

As such, may I assume the timer value rolls over from 86399 to 0 at midnight?
If so, doesn't the delta between two readings require modulation in order to
accommodate successive readings across this boundary?

The example code implies a delta of "delta := time2 - time1", but shouldn't
this be something like "delta := (time2 - time1 + 86400) % 86400"? This would
have to be adjusted in order to account for Mystic's precedence rules, but you
get the idea.

I would have tested this, but I'm not overly familiar with Windows and my
test box refuses to adjust its date/time - I've ticked/unticked all sorts of
boxes, but the system just syncs right back to the correct settings.

           o-----------o------------o-------------------------o
 TALIADON  |  2:250/6  |  21:3/138  |  [email protected]  |
o-----------o-----------o------------o-------------------------o
| "Error is a great teacher, and humility its hardest lesson." |
o--------------------------------------------------------------o
--- Mystic BBS v1.12 A46 2020/08/26 (Windows/32)
* Origin: TALIADON BBS (2:250/6)