Re: delay 1 millisecond in Panther
Re: delay 1 millisecond in Panther
- Subject: Re: delay 1 millisecond in Panther
- From: Emmanuel <email@hidden>
- Date: Fri, 13 Feb 2004 09:26:13 +0100
At 11:03 PM -0800 2/12/04, Christopher Nebel wrote:
>
On Feb 12, 2004, at 8:25 PM, Bill wrote:
>
>
>In the applescript 1.9.2 release note, it mentions that " The delay command now accepts real numbers. [2812515]".
>
>
>
><http://www.apple.com/applescript/releasenotes/192OSX.html>
>
>
>
>So, anyone have idea about delay 0.001, is it really delay for 1 millisecond?
>
>
Well, it won't return for at least one millisecond. :-) Seriously, "delay"'s accuracy is not guaranteed, and at best has a resolution of 1/60th of a second. If you need guaranteed millisecond timing, you shouldn't be using AppleScript. Heck, you probably shouldn't be using a normal consumer OS.
Smile is slightly better at that, its "smilepause x" makes a good job for x = 1 millisecond (expect an actual pause between 1 and 2 milliseconds). Also, its "chrono" has a good resolution, e.g. OMM (G3/900) it beats 5000 Hz.
Unlike "delay", "smilepause" lets the application responsive: this is usually helpful but on the other hand it makes "smilepause" depend still more than "delay" on the activity of the other processes.
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.