01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.rewriter.test.util;
06:
07: public class Timer {
08: private long startTime;
09: private long stopTime;
10:
11: public void start() {
12: reset();
13: startTime = System.currentTimeMillis();
14: }//start()
15:
16: public void stop() {
17: stopTime = System.currentTimeMillis();
18: }//stop()
19:
20: public long getTimeTaken() {
21: return stopTime - startTime;
22: }//getTimeTaken();
23:
24: private void reset() {
25: startTime = 0;
26: stopTime = 0;
27: }//reset();
28: }//class Timer
|