1 5 package com.opensymphony.webwork.util; 6 7 8 14 public class Timer { 15 17 long current = System.currentTimeMillis(); 19 long start = current; 20 21 23 public long getTime() { 25 long now = System.currentTimeMillis(); 27 long time = now - current; 28 29 current = now; 31 32 return time; 33 } 34 35 public long getTotal() { 36 return System.currentTimeMillis() - start; 38 } 39 } 40 | Popular Tags |