public <T extends java.lang.Runnable> T run(T runnable)
Executes Runnable.run() on a runnable whilst performing timings measurements
runnable - to run
public void close()
Equivalent to calling stop(), is used to satisfy the AutoCloseable interface
which allows this class to be used using java7's try-with-resources feature.
close in interface java.lang.AutoCloseable
public static Timings start(java.lang.Class<?> profiledClass,
Helper function for debugging that detects the plugin to use from a profiled class,
then creates a timings object if one does not exist in cache. The profiled class name
excluding path is prepended to the name. This function automatically
starts the timings measurement. Best used inside a try-with-resources block.
Not recommended for use in final releases, because the HashMap lookup is slow for high number of calls.
Hence this method is deprecated.