Ultimate Amiga

Network Boards => AMOS Language Discussion => AMOS Factory => AMOS Professional Forum => Topic started by: BooBoo on December 29, 2011, 07:34:18 PM

Title: Timer
Post by: BooBoo on December 29, 2011, 07:34:18 PM
Any ideas how I could have an accurate timer not affected by my loop, AMCAF has time commands indluding seconds but realy id like milliseconds

On a thread on EAB Samurai_Crow mentions using the timer.device with Dev commands

Any ideas?
Title: Re: Timer
Post by: Hungry Horace on January 04, 2012, 06:55:31 PM
the Timer command of AMOS counts 1/50th of second, and you can reset it to zero at any point with TIMER=0 .... is that any good?

This shouldnt be affected by the loop and i use it myself to ensure that each game loop takes at least 1/50th of a second to occur. (i.e. therefore remaining unaffected by JIT settings etc)
Title: Re: Timer
Post by: BooBoo on January 04, 2012, 09:00:55 PM
Thanks for you reply I had a bit on an idea dividing a second by 60
Title: Re: Timer
Post by: Lonewolf10 on February 14, 2012, 08:53:54 PM

Don't forget to check whether the system it's being run on is PAL or NTSC - unless you just plan to use it on an NTSC system. For PAL systems a second is 50 VBLs.


Regards,
Lonewolf10