Testing J2ME Timers

And I thought developing against cron was bad.

In J2ME, at least on BlackBerry devices, one cannot test Timer and TimerTask objects by simply changing the device clock. J2ME apps seems to remember the time at which they were launched, rather than pinging what the clock on the device says.

Testing involves shutting down the app, resetting the clock, and starting the app back up. Time consuming if you’re working on an app with some heavy startup / shutdown overhead.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.