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

📄 microtimer.nc

📁 一种改进的节点间测距算法
💻 NC
字号:
/**
 * This interface provides a generic timer that can be used to generate
 * events at regular intervals. This interface is for high-precision,
 * but limited duration, intervals
  */
interface MicroTimer {

  /**
   * Start the timer. 
   *  @param interval The timer interval in <b>microseconds</b> (1/1024
   *  second). Note that the 
   *    timer cannot support an arbitrary range of intervals.
   *    (Unfortunately this interface does not specify the valid range
   *    of timer intervals, which are specific to a platform.)
   *  @return Returns SUCCESS if the timer could be started with the 
   *    given interval.
   */
  command result_t start(uint32_t interval);

  /**
   * Stop the timer, preventing it from firing again. Note that the
   * timer might still fire before stop returns.
   * @return SUCCESS if the timer could be stopped, or FAIL if the timer 
   * is not running.
   */
  async command result_t stop();

  /**
   * The signal generated by the timer when it fires.
   */
  async event result_t fired();
}

⌨️ 快捷键说明

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