View Single Post
Old Nov 21st, 2004, 7:51 PM   #4
eccles
Newbie
 
Join Date: Nov 2004
Posts: 16
Rep Power: 0 eccles is on a distinguished road
pay careful attention to Sykkn's example.

note that he is creating a new Date instance each time he wants to get the curent time...

ie he is NOT doing:
Date date = new Date();
long timeStart = date.getTime();
... 
long timeEnd = date.getTime();
long duration = timeEnd - timeStart;

which was my initial thought about what you might be doing, but if you are getting the end time instead of zero then perhaps you aren't.

but yeah - just look at that correct example and you might see where you went wrong.

oh - and if you don't know where you are going wrong with something - don't assume that all people with need to see is a single line of your code - one which clearly has nothing wrong with it
eccles is offline   Reply With Quote