This week's book giveaway is in the Java in General forum. We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line! See this thread for details.
Hi, I'm wrighting a program that requires accurate readings from the system clock... is there an way to do it? I was trying to use the java.util.Calendar class, as follows: ... Calendar clock=Calendar.getInstance(); long time=clock.getTimeInMillis(); ... But if i try to check the time in the same method again it gives me the same result... How come? Is there a way to overcome this?
Thanx alot, that bit of code was of great help~! It pointed me out my mistake of getting only one instance of calendar and then enquiring it for time, but i should have gotten a new instance each time!
ilya, Please change your name to be compliant with JavaRanch's naming policy. Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name. You can change your name: here. Thanks, Cindy
"JavaRanch, where the deer and the Certified play" - David O'Meara