blob: 03cad7b37a62f9d3bd2996e93e7f97c7c44f9b45 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package com.yahoo.concurrent;
import java.util.concurrent.TimeUnit;
/**
* Implements the Timer interface by using System.nanoTime.
*
* @author baldersheim
*/
public class MonotonicTimer implements Timer {
@Override
public long milliTime() {
return TimeUnit.NANOSECONDS.toMillis(System.nanoTime());
}
}
|