Exemplo n.º 1
0
 public double getTime() {
   Date current_date = new Date();
   return (double) ((current_date.getTime() - start_date.getTime()) / 1000.0);
 }
Exemplo n.º 2
0
 public void reportClock(String title) {
   Date current_date = new Date();
   double seconds = (double) ((current_date.getTime() - start_date.getTime()) / 1000.0);
   System.out.println(title + ": time = " + seconds);
 }