Blitz crashes with high CreateTimer value

Archives Forums/Blitz3D Bug Reports/Blitz crashes with high CreateTimer value

Ross C(Posted 2006) [#1]
Warning, only run in windowed mode, as his freezes up my computer. It works at lower values, but seems to crash/freeze at 1500. Only Ctrl+Alt+Del and end task stops this.

Graphics 800,600,0,0
SetBuffer BackBuffer()
fps=CreateTimer(1500) ; <<<< crashes at this value. works at lower values!
While Not KeyDown(1)
  If KeyDown(57)
    For b=0 To 200
      If a=True
      Elseif a=False

Pongo(Posted 2006) [#2]
Crashes here too.

unrelated, but I'm curious as to why you would need a timer this fast anyways though. Why would you need to have something run through 1500 times per second? Even in your example above you would be limited to the refresh rate of the monitor. (60-75 fps) so any number above that is not changing the end result.

Beaker(Posted 2006) [#3]
I would be surprised if you can go over 1000.

Pongo(Posted 2006) [#4]
yea,... at 1000 then a single timer loop would be a single millisec.

jfk EO-11110(Posted 2006) [#5]
You can create your own timer system with an accuracy of about 1/50'000s when using Scanline().

John Blackledge(Posted 2006) [#6]
I've always been curious about this.

The Blitz help file says:-

WaitTimer(frameTimer) ; Pause until the timer reaches 60

- from which I took it that WaitTimer counts to 60 ms, then executes.

Whereas you're saying that it will execute after 1000/60 which is after/each 16.6 ms.

So who is right?

TomToad(Posted 2006) [#7]
CreateTimer(60) will tick off every 16.6 ms. The parameter is the frequency of the timer, not the duration.