0

I am trying to make a simple game in android. I need to make a timer which can be independent of system time. To make sure that user changes of system time doesn't influence the game timer. I need an idea, about how to do this?

Thanks in advance.

Rahul Choudhary
  • 3,789
  • 2
  • 30
  • 30
k0syak
  • 1
  • 1
  • 2
  • What's your question? Have you tried anything? – o0'. Sep 21 '11 at 08:31
  • 1
    A similar question was answered here http://stackoverflow.com/questions/3615231/get-device-and-user-independent-time-in-android – Rahul Choudhary Sep 21 '11 at 08:41
  • It's not for me. I can't connect to the internet in my aplication. Sorry if my question isn't correct (my english is so bad and it's my fist question on this forum). try to explain. There is some task, which must be runned after 1 hour. And timer must show currect time after reboot device even. How can i do this? – k0syak Sep 21 '11 at 09:41

1 Answers1

1

you can use CountDownTimer for this.

Vineet Shukla
  • 23,865
  • 10
  • 55
  • 63
  • I must keep it works when application is not running. And restore correct value when application runs back. – k0syak Sep 21 '11 at 09:02
  • http://stackoverflow.com/questions/3486162/android-how-to-use-a-timer, http://stackoverflow.com/questions/1877417/how-to-set-a-timer-in-android – Vineet Shukla Sep 21 '11 at 09:10