here is the CLOCKFACE script...coded in 3 MINUTES...17 LINES of CODE

Geoff Canyon geoff at runrev.com
Mon May 30 14:18:48 EDT 2005


On May 30, 2005, at 9:43 AM, Dar Scott wrote:

> On May 30, 2005, at 10:22 AM, Geoff Canyon wrote:
>
>
>>   send "setTime" to me in (1 - (the long seconds mod 1)) seconds
>>
>
> Very nice.  If I ever get around to updating the Primer on Message  
> Mechanics, this should go in there.
>
> At first I thought this might need a little fudge value added, but  
> now I think not.

I considered that possibility as well, but in practice it seems not.  
I think we thought of this because we're both being worrywarts. The  
math should result in, at minimum, a wait to _exactly_ the next  
second. If that happens _and_ the time spent executing the send...in  
is 0, _and_ the send...in trigger happens _exactly_ on schedule, it  
would still be he next second, and do the right thing.

Of course, nothing beats _not_ putting in the fudge factor and  
watching it for a minute to see what happens, which is what I did. ;-)


More information about the use-livecode mailing list