• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: timeout of 0 seconds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: timeout of 0 seconds


  • Subject: Re: timeout of 0 seconds
  • From: Emmanuel <email@hidden>
  • Date: Sun, 27 Jun 2004 21:41:57 +0200

At 12:13 PM -0700 27/06/04, Andrew Oliver wrote:
>Are you sure your test is valid, Emmanuel?

Pretty sure, yes ...

>Relying on something as variable as a ping timer makes the test invalid -
>there's no way to know whether the longer time was due to the 'with timeout'
>statement or just a hiccup on the network.

I spent quite a moment checking before posting. Actually, within the scope of my tests, the ping time was not so variable - 39 ms +/- 3 for Google, 169 ms +/- 10 for Apple, for instance.

>set t1 to GetMilliSec
>do shell script "sleep 1"
>set t2 to GetMilliSec
>with timeout of 0 seconds
> do shell script "sleep 1"
> set t3 to GetMilliSec
>end timeout

Thanks for helping with this test.

Maybe the weird behavior has something to see with Finder? Look:

chrono
with timeout of 0 seconds
tell application "Finder" to do shell script "sleep 1"
end timeout
chrono
-- 1.183
-- 1.288
-- 1.211

chrono
with timeout of 1 seconds
tell application "Finder" to do shell script "sleep 1"
end timeout
chrono
-- timeout error

chrono
with timeout of 2 seconds
tell application "Finder" to do shell script "sleep 1"
end timeout
chrono
-- 1.023
-- 1.038
-- 1.023

But maybe as I said the only relevant conclusion is that it's a bad idea to write "with timeout of 0 seconds" ...

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.


References: 
 >Re: timeout of 0 seconds (From: Andrew Oliver <email@hidden>)

  • Prev by Date: [ANN] PreFab UI Actions Public Beta
  • Next by Date: Newbie Trying to Write Script for Adobe Illustrator
  • Previous by thread: Re: timeout of 0 seconds
  • Next by thread: display dialog time out problem
  • Index(es):
    • Date
    • Thread