GAGETimer 1.1 has been released! The primary feature added was support for the 1.5 System.nanoTime() call. GAGETimer will check the VM version and use the nanotimer if it's 1.5 or higher. If that check fails, it will attempt to fall back on the windows DLL, and if that check fails (because the DLL is missing or you're not using Windows) it will finally fall back on System.currentTimeMillis().
Even more interesting is the addition of a new class called "DurationTimer". DurationTimer is a precise countdown timer that is useful for time bounded game events. Some interesting uses:
- Kill the player if they don't finish a level in time. (ala Mario Bros.)!
- Temporary power-ups like Quad damage!
- Fuses for bombs!
- Construction of units!
- Just about anything else that needs to happen within a set amount of time.
Methods are included for developing progress bars, showing seconds and percentages, and pausing the timer (important for when the user pauses the game or some event (like lack of money) stops the countdown).
So, what do you think?