John,
Wait for the screensaver to kick in ? :)
Cheers,
Pieter
- Original Message -
From: John Bird johnkb...@paradise.net.nz
To: NZ Borland Developers Group - Delphi List delphi@delphi.org.nz
Sent: Thursday, August 20, 2009 15:58
Subject: [DUG] CPU usage
Is there a simple way
Not that tricky.
function IsScreenSaverActive: Boolean;
begin
SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, @Result, 0);
end;
-Original Message-
From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz]
On Behalf Of John Bird
1 - there is no reliable way I have
Now I remember - I had tried this very code lots, and I had lots of trouble
getting it to work, after some empirical testing I found the boolean result
returned was always interpreted as true unless I copied the result into
another (Delphi) boolean, in which case it worked.
Is there any
John,
I just checked back through my emails. We talked about this back in
June.
There were a number of confirmations of the fact that it apparently
works fine.
That function I posted works perfectly for me on XP as is (compiled
under D2007). I've just tested it again; same result.
C.
Is there a simple way to find simple measure of current CPU usage?
Reason - have some housekeeping tasks that I would prefer to not run if the
computer is loaded at the moment, so an easy way to check before starting it
would be great.
Does not have to be too precise for my case, basically
Isn't that what a low priority thread is used for?
Is there a simple way to find simple measure of current CPU usage?
Reason - have some housekeeping tasks that I would prefer to not run if the
computer is loaded at the moment, so an easy way to check before starting it
would be great.
Of John Bird
Sent: Thursday, 20 August 2009 15:59
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] CPU usage
Is there a simple way to find simple measure of current CPU usage?
Reason - have some housekeeping tasks that I would prefer to not run if the
computer is loaded at the moment, so
Hi John,
Wait for the screensaver to kick in ? :)
Cheers,
Pieter
- Original Message -
From: John Bird johnkb...@paradise.net.nz
To: NZ Borland Developers Group - Delphi List delphi@delphi.org.nz
Sent: Thursday, August 20, 2009 15:58
Subject: [DUG] CPU usage
Is there a simple way