nl.uu.cs.treewidth.timing
Class JavaNanoTime

java.lang.Object
  extended by nl.uu.cs.treewidth.timing.JavaNanoTime
All Implemented Interfaces:
TimeSource

public class JavaNanoTime
extends java.lang.Object
implements TimeSource

Has better resolution than JavaSystemTime, but not sure if this is safe. (That's why it is not the default.) It definately isn't safe when multithreading on windows. It also might not be when singlethreaded on a multiproc/core windows. TODO Have a look at this sometime.

Author:
tw team

Constructor Summary
JavaNanoTime()
           
 
Method Summary
 long now()
          For Stopwatch to make sense, the result of subsequent calls to now() have to be non-decreasing (which is reasonable for `time').
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaNanoTime

public JavaNanoTime()
Method Detail

now

public long now()
Description copied from interface: TimeSource
For Stopwatch to make sense, the result of subsequent calls to now() have to be non-decreasing (which is reasonable for `time').

Specified by:
now in interface TimeSource
Returns:
in milliseconds.