hightimer.h
来自「linux程序」· C头文件 代码 · 共 45 行
H
45 行
#ifndef _COMPUNICATE_HIGHTIMER_H_
#define _COMPUNICATE_HIGHTIMER_H_
//#include <limits.h>
#include <stdio.h>
#include "OSHead.h"
#include <time.h>
#include <sys/time.h>
class HighTimer
{
public:
HighTimer();
HighTimer(struct timeval t1);
HighTimer(HighTimer &tm);
HighTimer(UInt16 year,UInt16 month,UInt16 mday,UInt16 hour=0,UInt16 minute=0,UInt16 second=0,UInt32 milliseconds=0);
~HighTimer();
void GetTimer(HighTimer *tm);
UInt16 GetYear();
UInt16 GetMonth();
UInt16 GetDayOfMonth();
UInt16 GetDayOfWeek();
UInt16 GetDayOfYear();
UInt16 GetHour();
UInt16 GetMinute();
UInt16 GetSecond();
UInt32 GetMicroSeond();
Bool8 GetIsError() { if(mIsError == 0) return 1;else return 0;}
Bool8 SetSystemTimer();
/// only test use
void DisplayMe();
// gettimeofday
private:
struct timeval cTm;
struct timezone cTmz;
SInt32 mIsError;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?