mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Use System.nanoTime() for timing measurements.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package org.briarproject.bramble.util;
|
||||
|
||||
public class TimeUtils {
|
||||
|
||||
private static final int NANOS_PER_MILLI = 1000 * 1000;
|
||||
|
||||
/**
|
||||
* Returns the elapsed time in milliseconds since some arbitrary
|
||||
* starting time. This is only useful for measuring elapsed time.
|
||||
*/
|
||||
public static long now() {
|
||||
return System.nanoTime() / NANOS_PER_MILLI;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user