Date.getTime question
I have the following code. Why do I only get the same output? Pls help. I'd like to get a timestamp diff.
Date thisMoment1 = new Date();
System.out.println("Start Time: " + thisMoment1.getTime());
Thread.sleep(5000);
System.out.println("EndTime: " + thisMoment2.getTime());
output:
Start Time: 997223951609
EndTime: 997223951609

