How to get the current time in Android?
When i use
int hours = java.sql.Time.this.getHours();
i get the error:
No
If you just want the current timestamp, you can use:
long millis = System.currentTimeMillis()
You can also get other time related values such as the uptime or total elapsed time since the last boot (including sleep time) from android.os.SystemClock.
android.os.SystemClock