📄 sbtrdtimeofday.hpp
字号:
/* SBtrdTimeOfDay, utility class for handling a time of day */
/****************License************************************************
*
* Copyright 2000-2003. ScanSoft, Inc.
*
* Use of this software is subject to notices and obligations set forth
* in the SpeechWorks Public License - Software Version 1.2 which is
* included with this software.
*
* ScanSoft is a registered trademark of ScanSoft, Inc., and OpenSpeech,
* SpeechWorks and the SpeechWorks logo are registered trademarks or
* trademarks of SpeechWorks International, Inc. in the United States
* and other countries.
*
***********************************************************************/
/* $Id: SBtrdTimeOfDay.hpp,v 1.1 2007/06/04 16:11:29 joegenbaclor Exp $ */
// -----1=0-------2=0-------3=0-------4=0-------5=0-------6=0-------7=0-------8
#ifndef _SBTRD_TIMEOFDAY_H__
#define _SBTRD_TIMEOFDAY_H__
#include <vxibuildopts.h>
#if P_VXI
#include "vxi/VXIheaderPrefix.h" // For SYMBOL_EXPORT_CPP_DECL
#include <time.h> // For time_t
#include "vxi/VXItypes.h" // For VXIint, VXIlong, etc.
#ifdef SBTRDUTIL_EXPORTS
#define SBTRDUTIL_API_CLASS SYMBOL_EXPORT_CPP_CLASS_DECL
#else
#define SBTRDUTIL_API_CLASS SYMBOL_IMPORT_CPP_CLASS_DECL
#endif
class SBTRDUTIL_API_CLASS SBtrdTimeOfDay {
public:
// Constructor and destructor
SBtrdTimeOfDay();
virtual ~SBtrdTimeOfDay();
// Set the time to the current time of day
bool SetCurrentTime( );
// Clear the time
void Clear( );
// Offset the time of day
void operator+= (VXIint32 offsetMs);
// Determine if the time is set
bool IsSet( ) const;
// Get the milliseconds offset from the current time value
VXIlong GetMsecBeforeTime( ) const;
VXIlong GetMsecAfterTime( ) const;
// Get the milliseconds offset from another time value
VXIlong GetMsecBeforeTime (const SBtrdTimeOfDay &tod) const;
VXIlong GetMsecAfterTime (const SBtrdTimeOfDay &tod) const;
// Comparison operators
bool operator< (const SBtrdTimeOfDay &tod) const;
bool operator> (const SBtrdTimeOfDay &tod) const;
bool operator== (const SBtrdTimeOfDay &tod) const;
private:
time_t _time;
unsigned short _millitm;
};
#include "vxi/VXIheaderSuffix.h"
#endif
#endif // include guard
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -