Hey so I was wondering how I could access the computers time in a program.
I have to write a pseudo program of my morning routine.
Thanks.
System time
Started by Ryanw327, Oct 01 2010 03:00 AM
2 replies to this topic
#1
Posted 01 October 2010 - 03:00 AM
|
|
|
#2
Posted 01 October 2010 - 04:18 AM
System.currentTimeMillis()
#3
Posted 02 October 2010 - 03:41 AM
Depending on what you want to do with the time; currentTimeMillis gives you just a big number (the amount of milliseconds since 1970).
Normally you can just use Date d = new Date() which makes a new Date-object with the current date and time... with this you can get a formattable date.
Normally you can just use Date d = new Date() which makes a new Date-object with the current date and time... with this you can get a formattable date.


Sign In
Create Account


Back to top









