Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified

Timer.schedule(..) Question


I try to use the Timer.schedule(TimerTask task,long delay,long period) API but somehow I don't do it right.

So I want to call this timer every 20 minutes. Here is my code:


timer.scheduleAtFixedRate(new CountDown(),5000, (20 * 1000) * 60);



20 is the number of minutes

1000 is the conversation to milliseconds 

60 is the conversation to seconds


whaat am I doing wrong? Doesn't that execute the timer every 20 minutes?





If your question was answered, please accept it as a sollution and / or give Kudos ;-)
Use the Search Field first! Maybe the question you want to ask already exists!
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Timer.schedule(..) Question

the call seems allright to me.
care to show the (relevant) code of CountDown()?
where do you call this code?
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter