Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
General
»
General discussions
»
[Solved] 100% CPU - no matter what code I use.
Print
Pages: [
1
]
Author
Topic: [Solved] 100% CPU - no matter what code I use. (Read 6310 times)
0 Members and 1 Guest are viewing this topic.
Guest
[Solved] 100% CPU - no matter what code I use.
«
on:
August 11, 2008, 08:33:08 am »
Going through all the tutorials on the SFML website, every single one of them make the CPU spike to 100% when running. Why is this?
FYI: So does SDL!
Logged
hacky
Newbie
Posts: 26
[Solved] 100% CPU - no matter what code I use.
«
Reply #1 on:
August 11, 2008, 09:32:38 am »
intel pentium 1
150 mhz?
Logged
Avency
Full Member
Posts: 113
[Solved] 100% CPU - no matter what code I use.
«
Reply #2 on:
August 11, 2008, 10:09:02 am »
If you don't limit your CPU usage, it will try to execute as fast as possible.
Try sf::Window::SetFramerateLimit() or sf::Sleep().
Logged
zarka
Jr. Member
Posts: 81
[Solved] 100% CPU - no matter what code I use.
«
Reply #3 on:
August 11, 2008, 10:19:06 am »
Code:
[Select]
int main()
{
while(1) { }
return 0;
}
this code will also make your CPU spike at 100% (if you have a single core)
Logged
//Zzzarka
Guest
[Solved] 100% CPU - no matter what code I use.
«
Reply #4 on:
August 11, 2008, 10:45:07 am »
SetFramerateLimit works perfectly, I think.
Thanks a bunch!
Logged
Kreeg
Full Member
Posts: 115
[Solved] 100% CPU - no matter what code I use.
«
Reply #5 on:
August 11, 2008, 12:49:38 pm »
Add the [Solved] tag to your thread's name.
Logged
Attention (va) aux (sur) messages (mon) subliminaux, (
blog
) camarade !
Print
Pages: [
1
]
SFML community forums
»
General
»
General discussions
»
[Solved] 100% CPU - no matter what code I use.
anything