Further optimize timings

This commit is contained in:
Sotr
2019-03-20 02:19:36 +08:00
parent dbfd5f4f2d
commit d72e245f40
15 changed files with 141 additions and 117 deletions

View File

@@ -34,6 +34,7 @@ public interface Timing extends AutoCloseable {
*/
Timing startTiming();
default Timing startTiming(boolean assertThread) { return startTiming(); }; // Akarin
default Timing startTimingUnsafe() { return startTiming(); }; // Akarin
/**
* <p>Stops timing and records the data. Propagates the data up to group handlers.</p>
@@ -41,6 +42,7 @@ public interface Timing extends AutoCloseable {
* Will automatically be called when this Timing is used with try-with-resources
*/
void stopTiming();
default void stopTimingUnsafe() { stopTiming(); }; // Akarin
/**
* Starts timing the execution until {@link #stopTiming()} is called.