Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detect sleep



I just wanted to point out that the interval time takes milliseconds as parameter. Of course you will be dumb if you set it to 30.
I use it with an interval of 30000 milliseconds to detect sleep. That is what I meant with the 30 seconds time frame.

You didn't make that clear in your original post.

By the way....
how do you intend to determine WHEN to call
tail /var/log/system.log | grep 'System Wake'
to find out that the mac was asleep???

I would assume you'd call this sort of thing in the onshow event handler to see if the computer had gone to sleep... However, if you need to know without the user showing dashboard, I'd guess you'd have to do a timeout (or interval)... this is why it's important to know what the need is.

If you just need to know if the computer has gone to sleep since the last time the widget was shown, an interval would be overkill for that...
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Dashboard-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Re: detect sleep (From: Michael Kwasnicki <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.