Click here to Skip to main content
15,908,264 members
Home / Discussions / C#
   

C#

 
GeneralRe: Calculating execution time less than 1 tick Pin
Dave Kreskowiak22-Oct-06 2:24
mveDave Kreskowiak22-Oct-06 2:24 
GeneralRe: Calculating execution time less than 1 tick Pin
Nicholas Butler22-Oct-06 2:48
sitebuilderNicholas Butler22-Oct-06 2:48 
GeneralRe: Calculating execution time less than 1 tick Pin
Dave Kreskowiak22-Oct-06 12:44
mveDave Kreskowiak22-Oct-06 12:44 
AnswerRe: Calculating execution time less than 1 tick Pin
Dave Kreskowiak22-Oct-06 2:25
mveDave Kreskowiak22-Oct-06 2:25 
QuestionSimple Byte.Parse question Pin
eggie521-Oct-06 16:09
eggie521-Oct-06 16:09 
AnswerRe: Simple Byte.Parse question Pin
Sean Michael Murphy21-Oct-06 16:25
Sean Michael Murphy21-Oct-06 16:25 
GeneralRe: Simple Byte.Parse question Pin
Vega0221-Oct-06 17:20
Vega0221-Oct-06 17:20 
QuestionHow to detect CPU usage or computer idle time... Pin
shultas21-Oct-06 16:05
shultas21-Oct-06 16:05 
Hi Everyone,

I have an application that I wrote in C# that allows users to back up their files to a network storage automatically. It uses the file modification times to figure out which files are newer on the computer than the storage location, and only copies the files it needs to on to the server.

The application starts a thread and the thread does all of the work in the background. What I would like to do is deploy the software to our computers and have it run automatically (and minimize itself) at system logon using a logon script.

I want my application to be able to detect when the CPU usage is at a certain level. If the CPU usage is below, lets say 20%, the application will do it's monitoring and copying. If the application detects the CPU usage rises above a certain threshold, it will suspend its operations and wait around for a while doing nothing.

I don't want the application running all of the time taking up CPU. My users run Photoshop and VS .NET and other applications simultaneously that take up most all of thier CPU.

Does anyone know of a way to detect what the current CPU usage is at? (Not the CPU usage of my application, but total CPU usage of all applications). I saw an article on here that gave you the usage of the current application, but it said it was difficult to do in .NET and they did not know how to do it.

Any help would be appreciated!
QuestionThe old ADO double play Pin
davecove21-Oct-06 15:27
davecove21-Oct-06 15:27 
QuestionWhich Db connection is better? Pin
Mark0621-Oct-06 13:08
Mark0621-Oct-06 13:08 
AnswerRe: Which Db connection is better? Pin
Rob Graham21-Oct-06 16:17
Rob Graham21-Oct-06 16:17 
AnswerRe: Which Db connection is better? Pin
Rob Graham21-Oct-06 16:21
Rob Graham21-Oct-06 16:21 
QuestionGetProcesses Error Pin
Inkyskin_UK21-Oct-06 12:50
Inkyskin_UK21-Oct-06 12:50 
AnswerRe: GetProcesses Error Pin
S. Senthil Kumar23-Oct-06 8:50
S. Senthil Kumar23-Oct-06 8:50 
QuestionReading VB6 PropertyBag using C#? Pin
marcel.toledo21-Oct-06 12:41
marcel.toledo21-Oct-06 12:41 
AnswerRe: Reading VB6 PropertyBag using C#? Pin
LongRange.Shooter23-Oct-06 4:30
LongRange.Shooter23-Oct-06 4:30 
QuestionMouse button click... Pin
new_phoenix21-Oct-06 11:19
new_phoenix21-Oct-06 11:19 
QuestionWhat's the meaning of the following code? Pin
Ming Luo21-Oct-06 10:46
Ming Luo21-Oct-06 10:46 
AnswerRe: What's the meaning of the following code? Pin
Tamimi - Code21-Oct-06 19:59
Tamimi - Code21-Oct-06 19:59 
QuestionHow to detect Attempt to connect? Pin
FlyOnIT21-Oct-06 9:52
FlyOnIT21-Oct-06 9:52 
AnswerRe: How to detect Attempt to connect? Pin
LongRange.Shooter23-Oct-06 4:32
LongRange.Shooter23-Oct-06 4:32 
QuestionNeed To license source or component. Pin
hdv21221-Oct-06 8:44
hdv21221-Oct-06 8:44 
QuestionHow to identify whether or not a control object has been instantiated... [modified] Pin
new_phoenix21-Oct-06 7:46
new_phoenix21-Oct-06 7:46 
AnswerRe: How to identify whether or not a control object has been instantiated... Pin
Guffa21-Oct-06 8:59
Guffa21-Oct-06 8:59 
GeneralRe: How to identify whether or not a control object has been instantiated... [modified] Pin
new_phoenix21-Oct-06 9:28
new_phoenix21-Oct-06 9:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.