⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timeinstrument.java

📁 Java开发最新的日志记录工具slf4j的源码
💻 JAVA
字号:
package org.slf4j.profiler;


/**
 * This interface sets the methods that must be implemented by 
 * {@link Profiler} and {@link  StopWatch} classes. It settles the 
 * general feel of the profiler package.
 * 
 * @author Ceki Gülcü
 *
 */
public interface TimeInstrument {

  /**
   * All time instruments are named entities.
   * @return the name of this instrument
   */
  String getName();
  
  
  TimeInstrumentStatus getStatus();
  
  /**
   * Start tis time instrument.
   * 
   * @param name
   */
  void start(String name);
  
  /**
   * Stop this time instrument.
   * 
   * @return this
   */
  TimeInstrument stop();

  /**
   * Time elapsed between start and stop, in nanoseconds.
   * 
   * @return time elapsed in nanoseconds
   */
  long elapsedTime();
  
  /**
   * Print information about this time instrument on the console.
   */
  void print();
  
  /**
   * If the time instrument has an associated logger, then log information about 
   * this time instrument. Note that {@link StopWatch} instances cannot log while {@link Profiler}
   * instances can.
   */
  void log();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -