Would someone please help me with implementing a countdown timer in milliseconds?
I know how to implement a countdown timer in seconds the only thing left for me is to play with the format so the milliseconds will show… dunno how to do that. help would be great!
I’m searching for any kind of working method. In my game I want to have a countdown timer in seconds( that shows milliseconds as well) in a 00:000 format. any idea how do I do that?
Please keep in mind the screen is only going to update either 30 or 60 times per second. At 60fps you’re only going to update ever 16.6667 milliseconds. Any attempt to trigger timers faster than that is futile.
You best bet if you want to display what appears to be millisecond times is to use an Runtime “enterFrame” listener, calculate the time off of system.getTimer() and update your display once per frame.
Whatever triggers your timer to stop can grab the system time, compute the final value and then display it.
I’ve tried… more or less like the code I pasted above. still cannot understand how do I change that to a countdown timer. cannot manage to find any useful info in the forums about the subject. thanks for the link by way.
I’m searching for any kind of working method. In my game I want to have a countdown timer in seconds( that shows milliseconds as well) in a 00:000 format. any idea how do I do that?
Please keep in mind the screen is only going to update either 30 or 60 times per second. At 60fps you’re only going to update ever 16.6667 milliseconds. Any attempt to trigger timers faster than that is futile.
You best bet if you want to display what appears to be millisecond times is to use an Runtime “enterFrame” listener, calculate the time off of system.getTimer() and update your display once per frame.
Whatever triggers your timer to stop can grab the system time, compute the final value and then display it.
I’ve tried… more or less like the code I pasted above. still cannot understand how do I change that to a countdown timer. cannot manage to find any useful info in the forums about the subject. thanks for the link by way.