ID:259543
 
Hey, how about a proc that gets called whenever world.cpu goes over 100%? This could be useful for debugging purposes, traffic control, adjusting the tick lag, etc.
Lesbian Assassin wrote:
Hey, how about a proc that gets called whenever world.cpu goes over 100%? This could be useful for debugging purposes, traffic control, adjusting the tick lag, etc.

Well right now we can soft-code this.

//example
world/New()
while(1)
sleep(1)//I would use a higher delay
if(world.cpu >= 100) CPU_High()

proc/CPU_High()
world << "CPU is to high"

I use this kind a proc when I debug. I do however agree that it would be helpful to have it inbuilt into DM.
In response to Darkness
Oh, I do that, too. It's just that polling cpu every tick probably isn't as efficient as having something automatically triggered by the program itself.
In response to Lesbian Assassin
Especially since the soft-coded code contributes to part of the processing time I bet... having it builtin would be better...