[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Idle



Is there a way to check if the Mac is idle?  I've tried:

#!perl
use Mac::Gestalt qw(%Gestalt gestaltPMgrCPUIdle);
sub check{print $Gestalt{gestaltPMgrCPUIdle},"!\n"}
DO: {check;sleep(5);redo DO}

but that never returns a value.  Of course, that might mean my machine is
not idle.  Actually, I tried an example from the .xs file with
gestaltAppleTalkVersion, and that did not return a value, either.

Thanks for the help,

--
Chris Nandor                 pudge@pobox.com                 http://pudge.net/
%PGPKey=('B76E72AD',[1024,'08 24 09 0B CE 73 CA 10  1F F7 7F 13 81 80 B6 B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch