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

📄 timer.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
字号:
// timer.h,v 1.4 2000/11/11 17:39:56 bala Exp

// ============================================================================
//
// = LIBRARY
//   TAO/tests/Xt_Stopwatch
//
// = FILENAME
//   timer.h
//
// = AUTHOR
//   Bala <bala@cs.wustl.edu>
//
// ============================================================================

#ifndef TIMER_H
#define TIMER_H

#include "Stopwatch_display.h"

#if defined (ACE_HAS_XT)

#include <Xm/Xm.h>


class Timer_imp
{
 public:

  Timer_imp (XtAppContext &,
             CORBA::Long,
             Stopwatch_display *);
  // Constructor..

  void start (void);
  // Resets, and starts the clock ticking

  void stop (void);
  // Stops the clock

  CORBA::Float  elapsed_time (void);
  // Returns time since timer started

 private:

  static void tick_callback (XtPointer,
                             XtIntervalId *);
  // Static member function used for TimeOut callback.

  void tick (void);
  // Called every interval_ milliseconds

  virtual void report_time (CORBA::Float);
  // Called at each clock tick...

  Stopwatch_display *stopwatch_;
  // A copy of the stopwatch object

  CORBA::Long counter_;
  // Current number of ticks

  CORBA::Long interval_;
  // Time in milliseconds between updates

  XtIntervalId id_;
  // Identifier of current TimeOut

  XtAppContext app_;
  // Required by Xt functions
};

#endif /*ACE_HAS_XT*/

#endif /* TIMER_H */

⌨️ 快捷键说明

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