ID:1326536
 
world
fps = 100
mob/verb/setfps(var/N as num)
world.fps = N
world<<"Set FPS to: [N], actual fps: [world.fps]"

mob/verb/getInfo()
world<<"Cpu: [world.cpu]"
world<<"Tick rate: [world.tick_lag]"
world<<"Fps: [world.fps]"

mob/verb/testTickRate()
world<<time2text(world.timeofday,"mm:ss")
sleep(1)
world<<"sleep(1)"
world<<time2text(world.timeofday,"mm:ss")
sleep(10)
world<<"sleep(10)"
world<<time2text(world.timeofday,"mm:ss")
sleep(100)
world<<"sleep(100)"
world<<time2text(world.timeofday,"mm:ss")


At 1000 fps sleep(100) takes 20 seconds to complete.

Wat.
FPS
fps
Fps

WHY CAN'T I MAKE UP MY MIND
You should be checking world.tick_lag after you set world.fps

world.fps is a "convenience" variable which is actually not used by the internals other than to set the tick_lag when you change fps. That equation works out to 10 / fps.

If you set fps to 40, world.tick_lag will be set to 0.25 (10 / 40).

At any rate, the internals "re-adjust" anything that is out of bounds... So its not possible to have a tick_lag that's in between milliseconds, for example. There is probably a low and high cap on tick_lag.
In response to FIREking
FIREking wrote:
You should be checking world.tick_lag after you set world.fps



See my display picture for appropriate reaction.


And the cap is on FPS, it set it to 333,500,700 and then 1000. You can't have inbetween.


At 1000 fps tick_lag is 0.01, yet sleep(100) took 20 seconds to complete.

Weirdnessidoodles.
In response to FIREking
Or maybe you can have inbetween, but, regardless it sets the cap to those amounts when you try to go above them.
I told you to check because you had that stuff in the getinfo verb and not reporting it after setfps verb...

in other words, you could click setfps and not check what tick_lag was changed to unless you clicked getinfo
Maybe it's just your sick rig bruh ;)
This guy is mad. >_>