Esempio n. 1
0
 /** 结束当前子任务 */
 public static void endTask() {
   TimeProfiler profiler = local.get();
   if (profiler == null) {
     throw new IllegalStateException("Can't end ProfilerTask: TimeProfiler is not running");
   }
   if (profiler.currentTask == null) {
     throw new IllegalStateException("Can't end ProfilerTask: currentTask is null");
   }
   ProfilerTask current = profiler.currentTask;
   current.end();
   boolean iFireIt = current.fire;
   profiler.currentTask = profiler.currentTask.getParentTask();
   if (iFireIt) {
     profiler.release();
   }
 }