com.intel.hadoop.graphbuilder.util
Class Timer
java.lang.Object
com.intel.hadoop.graphbuilder.util.Timer
public class Timer
- extends java.lang.Object
A simple timer class that can be used for benchmarking/timing up to
microsecond resolution.
- Author:
- Haijie Gu
Constructor Summary |
Timer()
Initialize the timer with the current time. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Timer
public Timer()
- Initialize the timer with the current time.
start
public void start()
- Reset the timer with current time.
current_time
public long current_time()
- Returns:
- the time in seconds passed since last reset.
current_time_millis
public long current_time_millis()
- Returns:
- the time in milliseconds passed since last reset.
time_since_last
public long time_since_last()
- Returns:
- the time passed since last read.
time_since_last_millis
public long time_since_last_millis()
- Returns:
- the time in milliseconds passed since last read.