Computer Science Canada CPU Usage |
Author: | Sag [ Wed Apr 14, 2004 11:06 pm ] |
Post subject: | CPU Usage |
I have made a lot of programs before with Turing but am now trying to cut down the CPU Usage in my programs. I was just wondering if anyone knows how to cut down some of the CPU usage. When i use the get command in turing and test it, it doesn't use any of the cpu usage but when i try to make it into an exe and run it when it gets to the Waiting for Input it uses 100% of the CPU. Same thing happens when i use the Net.WaitForConnection but it uses 100% of the CPU when it is tested in turing and when its an exe. Can anybody help me. Thanks. |
Author: | Tony [ Wed Apr 14, 2004 11:13 pm ] | ||||
Post subject: | |||||
that's because those functions that 'wait' for something run a continues loop
and that hogs all the CPU usage. I'm not sure if there's a way to go around that loop for Net.WaitForConnection function, but you can bypass waitloop for get using
model for input. You'd have to cover backspacing and return to compleat the function |