in hugegraph-common/src/main/java/org/apache/hugegraph/perf/PerfUtil.java [95:122]
public static void useLocalTimer(boolean yes) {
if (yes) {
if (LOCAL_TIMER != null) {
return;
}
LOCAL_TIMER = new LocalTimer();
try {
LOCAL_TIMER.startTimeUpdateLoop();
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
if (!LIGHT_WATCH) {
NormalStopwatch.initEachWastedLost();
}
} else {
if (LOCAL_TIMER == null) {
return;
}
try {
LOCAL_TIMER.stop();
} catch (InterruptedException e) {
throw new RuntimeException(e);
} finally {
LOCAL_TIMER = null;
}
}
}