summaryrefslogtreecommitdiffstats
path: root/src/jake2/sys/StandardTimer.java
blob: 133bb2456db281de0e717a5b54d2b743d94c3640 (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
/*
 * StandardTimer.java
 * Copyright (C) 2005
 * 
 * $Id: StandardTimer.java,v 1.1 2005-07-01 14:11:00 hzi Exp $
 */
package jake2.sys;


class StandardTimer extends Timer {

	private long base;
	
	StandardTimer() {
		base = System.currentTimeMillis();
	}
	
	public long currentTimeMillis() {
		long time = System.currentTimeMillis();
		long delta = time - base;
		if (delta < 0) {
			delta += Long.MAX_VALUE + 1;
		}
		return delta;
	}

}