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

📄 time_utilities.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
字号:
/* -*- C++ -*- */
// Time_Utilities.h,v 1.12 2003/11/01 11:15:09 dhinton Exp

// ============================================================================
//
// = LIBRARY
//    orbsvcs
//
// = FILENAME
//    Time_Utilities.h
//
// = AUTHOR
//     David Levine <levine@cs.wustl.edu>
//
// ============================================================================

#ifndef ORBSVCS_TIME_UTILITIES_H
#define ORBSVCS_TIME_UTILITIES_H
#include /**/ "ace/pre.h"

#include "orbsvcs/TimeBaseC.h"
#include "orbsvcs/svc_utils_export.h"
#include "ace/OS_NS_time.h"

class TAO_Svc_Utils_Export ORBSVCS_Time
{
  // = TITLE
  //   Time conversion utilities.
  //
  // = DESCRIPTION
  //   This class define several static methods to convert between
  //   several time structures and the CORBA TimeT structure.
  //
  //   Recall that TimeT stores time in a 64-bit long long (or
  //   structure when that is not available) and uses hundreds of
  //   nanoseconds as time units (i.e. 1 second is 10^7 TimeT units).
public:
  // = A helper constant, IDL does not have constant for structures.
  static TimeBase::TimeT zero ();

  // = ACE_hrtime_t conversion routines.

  // We interpret an ACE_hrtime_t as nanoseconds.

  static void hrtime_to_TimeT (TimeBase::TimeT &lhs,
                               ACE_hrtime_t rhs);
  // Convert high-resolution time to a <TimeT>.

  static void TimeT_to_hrtime (ACE_hrtime_t &lhs,
                               const TimeBase::TimeT &rhs);
  // Convert <TimeT> to a high-resolution time.

  static ACE_hrtime_t to_hrtime (const TimeBase::TimeT &t);
  // Convert <TimeT> to a high-resolution time.

  // = ACE_Time_Value conversion routines.

  // Recall that <ACE_Time_Value>s are <seconds, useconds> pairs.

  static void Time_Value_to_TimeT (TimeBase::TimeT& lhs,
                                   const ACE_Time_Value& rhs);
  // Convert an <ACE_Time_Value> to a <TimeT>.
  static void TimeT_to_Time_Value (ACE_Time_Value& lrs,
                                   const TimeBase::TimeT& rhs);
  // Convert an <TimeT> to a <ACE_Time_Value>.

  static ACE_Time_Value to_Time_Value (const TimeBase::TimeT &rhs);
  // Convert an <TimeT> to a <ACE_Time_Value>.
};

#if defined (__ACE_INLINE__)
#include "orbsvcs/Time_Utilities.i"
#endif /* __ACE_INLINE__ */

#include /**/ "ace/post.h"
#endif /* ORBSVCS_TIME_UTILITIES_H */

⌨️ 快捷键说明

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