Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / darkSDK CPU usage

Author
Message
Denaje
19
Years of Service
User Offline
Joined: 5th Feb 2005
Location:
Posted: 19th Aug 2005 17:18
Is there any way to tell my game to not use 100% of the CPU usage, or at least give it up when another application needs it?

"Anyone who is not shocked by quantum theory has not understood it."
-Neils Bohr
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Aug 2005 21:14
You can insert a 'Sleep(1);' into your code just after the 'dbSync();' calls.

If some other application wants system time, and your app sleeps, then other apps will get a full timeslice if they need it.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Denaje
19
Years of Service
User Offline
Joined: 5th Feb 2005
Location:
Posted: 20th Aug 2005 17:11
What if the game takes up so much cpu power not due to syncing, but due to very intense calculations?

"Anyone who is not shocked by quantum theory has not understood it."
-Neils Bohr
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 28th Aug 2005 21:09
This should be the same as DBpro's CPU usage. Search for CPU in the DBpo board; the first two results are especially helpful.

-Xol


DBpro IonRay IDE: Demo 0.1.0.0 available!
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 28th Aug 2005 22:01
Quote: " What if the game takes up so much cpu power not due to syncing, but due to very intense calculations?"

In which case you need to do the message processing.

Come to the third DarkBasic Pro Sci Fi Con - Be there and be square
Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk

Login to post a reply

Server time is: 2024-11-19 01:38:13
Your offset time is: 2024-11-19 01:38:13