blob: df781274913f13ef86ca917e3c772eb72b2f7750 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// This class encapsulates a Timer mechanism
// Can be used for Profiling of parts of code and gathering statistics
package NexusII ;
public class Timer {
public Timer()
{
start_ = 0 ;
}
public void start()
{
start_ = System.currentTimeMillis();
}
public long elapsed_time()
{
return System.currentTimeMillis() - start_ ;
}
public void stop()
{
start_ = 0 ;
}
private long start_ = 0 ;
}
|