+ 1

The class Date()

This class has a method called getTime()which returns how many miliseconds from 1970 till now If I want to increase the milliseconds from 0 and the user click stop How can I do it please

5th Dec 2021, 10:09 PM
Amal Gil
Amal Gil - avatar
1 ответ
+ 3
In this case I would use System.currentTimeMillis() or System.nanoTime() https://www.baeldung.com/java-measure-elapsed-time
6th Dec 2021, 12:21 AM
Denise Roßberg
Denise Roßberg - avatar