Re: Different processor speeds
Re: Different processor speeds
- Subject: Re: Different processor speeds
- From: Jolly Roger <email@hidden>
- Date: Thu, 01 Mar 2001 11:44:49 -0600
- Replyto: email@hidden
on 3/1/01 7:03 AM, G.H. Hovagimyan (email@hidden) wrote:
>
How does one balance or quantify processor time so that a script functions the
>
sdame on different machines?
It really depends on what your script is doing. Since you have given very
little information on what your script does, it's hard to offer a good
solution to your problem.
A couple ideas:
If you don't mind saving your script as an application, use an idle handler.
The return value of an idle handler determines how many seconds will expire
before the idle handler is called again. You might set the idle handler up
to be called once a second (a return value of 1), and then keep a
property/global counter to keep track of how many seconds have expired:
property gCounter : 0
on run
set gCounter to 0
end run
on idle
set gCounter to gCounter + 1
if gCounter > 60 then
-- one minute has expired
end if
return 1
end idle
Another option (that may not apply to your particular situation) is to use
the Standard Additions "delay" command to pause script execution for a
certain number of seconds:
delay 60 -- delay for one minute
If you want more ideas, then please either post your script, or tell us more
about what your script does/
JR