Just how accruate is Millisecs() anyway?

Miscellaneous Forums/General Discussion/Just how accruate is Millisecs() anyway?

OK, based on PGF's idea and some testing I have the answer ...

When you call LockBuffer BackBuffer() and UnlockBuffer BackBuffer and later on use a Flip command, the Lock/Unlock waits for VSync thus takes 13ms in 75Hz and 17ms in 60Hz and 12ms in 85Hz and the Flip takes 0ms!

If however, you use VWait and Flip False, the Lock/Unlock drops to 0ms and the VWait/Flip False takes 13ms as expected! This is how I thought it would work when using plain Flip but it seems it's not the case. It also explains why in the past I was getting some weird debug times displayed on one of my other games.

Luckily my games support both Flip and VWait/Flip False via an .ini setting. A while ago I read you should always use the VWait/Flip Flase method anyway and did for ages on my PC fine, but noticed that it wasn't that reliable on some other PCs which is why I think the option is important. It's just a shame it's not the same on all PCs, like Amigas!

Thanks to all for the help, hope you've learnt something too. And to answer my original questions, it seems that Millisecs IS very reliable, but knowing when Vsync occurs is not!