Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / Java / JSP - Creating a Timer

Author
Message
Riz
17
Years of Service
User Offline
Joined: 7th Dec 2008
Location:
Posted: 23rd Aug 2009 22:20
Hey everyone,

I was wondering how exactly would i go about creating a timer using swing.timer in order to have my image(s) descend at a specific rate?
Id appreciate any help. Thanks in advance
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 23rd Aug 2009 22:41
I don't know about swing.timer, but there's always System.nanoTime().
I don't think there's any built in functions to get milliseconds or microseconds, but that's easily achieveable through the nanosecond timer (bear in mind that it isn't to be expected to be perfect down to nanoseconds; that's just its resolution).



Login to post a reply

Server time is: 2026-06-10 03:30:02
Your offset time is: 2026-06-10 03:30:02