Relaxing the PureBasic Network (Server) example file

Windows specific forum
User avatar
SimpleMind
Enthusiast
Enthusiast
Posts: 112
Joined: Sun May 18, 2003 12:40 pm
Location: Netherlands

Relaxing the PureBasic Network (Server) example file

Post by SimpleMind »

Hi,

I'm experimenting with this code and discovered that the CPU usage is booming to 100% and other apps stand still.

Is there a way to throttle the CPU usage?

Regards,

Marcel
Give me books, fruit, french wine, fine weather and a little music.
John Keats
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: Relaxing the PureBasic Network (Server) example file

Post by NoahPhense »

SimpleMind wrote:Hi,

I'm experimenting with this code and discovered that the CPU usage is booming to 100% and other apps stand still.

Is there a way to throttle the CPU usage?

Regards,

Marcel
Don't have the code in front of me, but Delay(1) should be inserted some
where.

- np
User avatar
SimpleMind
Enthusiast
Enthusiast
Posts: 112
Joined: Sun May 18, 2003 12:40 pm
Location: Netherlands

Post by SimpleMind »

Thanks NoahPhense, that did the job.

Regards Marcel
Give me books, fruit, french wine, fine weather and a little music.
John Keats
..::Origin::..
Enthusiast
Enthusiast
Posts: 125
Joined: Sat Jun 17, 2006 3:15 pm

Post by ..::Origin::.. »

The more time you can spare to be delayed, often the less cpu is used. In all my applications: "Delay(20)" keeps it always at 0 CPU unless i'm doing something critical.
Post Reply