ICE 3.4.2
[php5-ice-freebsdport.git] / java / demo / Freeze / bench / StopWatch.java
blobe97dca65a3cdfc4c0d80326dce7b7c20a5ef19c9
1 // **********************************************************************
2 //
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
4 //
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
7 //
8 // **********************************************************************
10 class StopWatch
12 StopWatch()
16 public void
17 start()
19 _stopped = false;
20 _start = System.currentTimeMillis();
23 public long
24 stop()
26 if(!_stopped)
28 _stop = System.currentTimeMillis();
29 _stopped = true;
31 return _stop - _start;
34 private boolean _stopped;
35 private long _start;
36 private long _stop;