1 26 package org.objectweb.speedo.j2eedo.common; 27 28 import java.util.Date ; 29 30 public class TraceTimeElement { 31 public String task; 32 public Date beginTime; 33 public Date endTime; 34 35 public TraceTimeElement(String str) { 36 this.task = str; 37 this.beginTime = new Date (); 38 } 39 40 public void endTask() { 41 this.endTime = new Date (); 42 } 43 44 public long duration() { 45 return this.endTime.getTime() - this.beginTime.getTime(); 46 } 47 } 48 | Popular Tags |