Losing track of time

Dar Scott dsc at swcp.com
Mon Aug 11 11:54:02 EDT 2003


On Friday, August 8, 2003, at 11:30 AM, Howard Bornstein wrote:

> The problem is that, for example, if I set the timer to chime every  
> hour,
> I am losing about 5 seconds each time I cycle through. Originally, this
> was because I had the play "chime2.wav" command before the send  
> reminder
> command. So it would play the chime, which takes several seconds,  
> before
> resetting the time.

The send is based on the date and time.  Though you specify it as a  
delta, you are really creating a message that is readied for execution  
at a time.

Because of that you want your chime to be based on the time.

I think someone has suggested a method in which you poll the clock ever  
second.

Another is to calculate the delay in the send based on the time.   
Calculate the seconds of the date/time you want the chime,  
chimeSeconds.  Then do something like this:

    send "reminder" to me in long seconds - chimeSeconds seconds.

Keep that short and quick.

Dar

************************************************************************ 
****
   Dar Scott Consulting    http://www.swcp.com/dsc/    Programming  
Services
************************************************************************ 
****




More information about the use-livecode mailing list