[android-developers] Re: android can we get current time ?

2013-09-06 Thread ashish
Hi , i want to perform some operation e.g 2 aug 2013(time i get is in milliseconds) to 3 aug 2013 and after it i have to stop the task... On Thursday, September 5, 2013 8:31:50 AM UTC-8, Nobu Games wrote: Android provides the

[android-developers] Re: android can we get current time ?

2013-09-05 Thread Alex Avance
If you're wanting to do an operation based on elapsed time, there are java based options. System.nanoTime() returns a value based on elapsed time as measured by the VM from which it is called. https://developer.android.com/reference/java/lang/System.html#nanoTime()

[android-developers] Re: android can we get current time ?

2013-09-05 Thread Nobu Games
Android provides the SystemClockhttp://developer.android.com/reference/android/os/SystemClockcomponent that gives you the elapsed milliseconds since boot. I guess that's pretty much what you want. On Thursday, September 5, 2013 3:57:34 AM UTC-5, ashish wrote: Hi, i want to perform some

Re: [android-developers] Re: android can we get current time ?

2013-09-05 Thread Michael Banzon
This depends very much on what is meant by current time. Although my first reply was a bit short and non-explaining I do stand by it. If by current time we mean the actual time of day according to solar/planetary movement - then no - there is no way to be sure what time it is. The usefulness of