Re: [DUG] CPU usage

2009-08-20 Thread John Bird
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

Re: [DUG] CPU usage

2009-08-20 Thread Conor Boyd
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

Re: [DUG] CPU usage

2009-08-20 Thread John Bird
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

Re: [DUG] CPU usage

2009-08-20 Thread Conor Boyd
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.

[DUG] CPU usage

2009-08-19 Thread John Bird
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

Re: [DUG] CPU usage

2009-08-19 Thread Todd Martin
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.

Re: [DUG] CPU usage

2009-08-19 Thread Jolyon Smith
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

Re: [DUG] CPU usage

2009-08-19 Thread Pieter De Wit
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