Skip to main content
gamedev.net
🔒 Locked

CPU usage 100%??

Started by edwinnie Apr 17, 2004 at 8:35 PM 5 replies 650+ views
Original Post
edwinnie
edwinnie
ok, i ran a simple blank winform and noticed that the CPU usage in the task manager is approximate 100% all the time. Is this normal?
haro
haro
Most likely your application is constantly checking for updates which would take 100% of the CPU. If you want to give room for other threads then you can do it manually by sleeping. Just call sleep(1) in whichever language you are using. This will give other threads time to continue execution.
StaticReality
StaticReality
If the application is not doing anything then no, it is not normal. Applications that are stuck in loops and don''t give up processing time tend to do this.

Static
Colin Jeanne
Colin Jeanne
quote:
Original post by haro
Just call sleep(1) in whichever language you are using. This will give other threads time to continue execution.

If you're using Windows, Sleep(0) will yield the remainder of the timeslice.


Thanks Salsa!Colin Jeanne | Invader's Realm
"I forgot I had the Scroll Lock key until a few weeks ago when some asshole program used it. It even used it right" - Conner McCloud

[edited by - Invader X on April 17, 2004 10:21:07 PM]
Archi
Archi
See that post, there's my solution for this problem.
http://www.gamedev.net/community/forums/topic.asp?topic_id=220105

Damn it, how should I make it href?

[edited by - archi on April 17, 2004 10:53:30 PM]
SiCrane
SiCrane
To linkify something just use normal html. Like:
<a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=220105"> link text</a>
bytecoder
bytecoder
I wish people would actually search the forums before posting--this question must''ve been asked a million times!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.