Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '"do shell script sleep"? why not just...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
"do shell script sleep"? why not just...
Authored by: baronworm on Oct 11, '04 03:54:07PM

"delay 5"?

but I guess I'm splitting hairs when we're talking about the most efficient way to tell a program to "please sit and do nothing..."


[ Reply to This | # ]
"do shell script sleep"? why not just...
Authored by: jimhoyt on Oct 11, '04 07:18:13PM
If you take a look at your cpu usage for the two commands you'll find that

do shell script "sleep 5"

churns up far less of your Mac than

delay 5

Try it! :)

[ Reply to This | # ]

Authored by: jecwobble on Oct 12, '04 01:02:28PM

I use "sleep" instead of "delay" for the very reason Jim states above. In fact, I search these hints while writing the AppleScript because I had this vague nagging feeling there was something bad about "delay".

[ Reply to This | # ]