Esempio n. 1
0
 /**
  * 开始一个子任务,如果没有启动profile,则此方法将启动profile运行
  *
  * @param string 子任务名称
  */
 public static void beginTask(String string) {
   TimeProfiler profiler = local.get();
   boolean iFireIt = false;
   if (profiler == null) {
     profiler = start(string);
     iFireIt = true;
   }
   ProfilerTask task = profiler.new ProfilerTask(string);
   task.fire = iFireIt;
   profiler.addTask(task);
   task.start();
 }