• 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: Andrew Oliver <email@hidden>
  • Date: Sun, 27 Jun 2004 14:23:28 -0700

On 6/27/04 12:13 PM, "Andrew Oliver" <email@hidden> wrote:

> (admittedly, only by a second or two, but not the order of magnitude

Of course, I mean by a millisecond or two... :)

Andrew
:)

> Are you sure your test is valid, Emmanuel?
>
> 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.
>
> Indeed, the following code snippet indicates the opposite, where the 'with
> timeout 0' statement consistently performing faster than the other
> (admittedly, only by a second or two, but not the order of magnitude
> difference you're seeing).
>
> (note I'm using the getmillisec OSAX rather than chrono since I don't have
> Smile)
>
> 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
>
> display dialog "No timeout = " & ((t2 - t1) as string) & return & "Timeout 0
> =" & (t3 - t2) as string
>
> Andrew
> :)
>
> On 6/27/04 4:15 AM, "Emmanuel" <email@hidden> wrote:
>
>> On my machine (10.2.8) "with timeout of 0 seconds" makes things slower. I
>> suppose it's a bad idea to use "timeout of 0 seconds".
>>
>> -------------------
>> chrono -- this works only in Smile
>> with timeout of 0 seconds
>> tell application "Finder" to do shell script "ping -c 1 '66.102.9.99'"
>> end timeout
>> chrono
>> -- Results: 0.20 to 0.50 second (but no timeout error)
>> -------------------
>>
>> -------------------
>> chrono -- this works only in Smile
>> with timeout of 1 seconds
>> tell application "Finder" to do shell script "ping -c 1 '66.102.9.99'"
>> end timeout
>> chrono
>> -- Results: 0.05 to 0.06 second
>> -------------------
>>
>> 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.
> _______________________________________________
> 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.
_______________________________________________
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: Re: guess the file size of compressed file from the original
  • Next by Date: Re: Filemaker Pro 7 How to get cell contents.
  • Previous by thread: Re: timeout of 0 seconds
  • Next by thread: Re: timeout of 0 seconds
  • Index(es):
    • Date
    • Thread