📄 timer.h
字号:
#ifndef _CTI_RDP_TIMER_H_
#define _CTI_RDP_TIMER_H_
//#include <limits.h>
#include <stdio.h>
#include <time.h>
#include "OSHead.h"
class TimerSpan;
class Timer
{
friend class TimerSpan;
public:
Timer();
Timer(time_t tm);
Timer(Timer &tm);
Timer::Timer(UInt16 year,UInt16 month,UInt16 mday,UInt16 hour,UInt16 minute,UInt16 second);
~Timer();
OS_Error GetLogTime(char *buf);
OS_Error GetLongTime(char *buf);
OS_Error GetTimeWithInterval(char *buf,char ch = '-');
SInt64 DiffTimer(Timer &time2);
time_t GetTimer() { return mCurrTime;}
SInt32 GetTimeInterval();
void SetCurrentTime();
Timer& operator - (TimerSpan &t);
UInt16 GetYear();
UInt16 GetMonth();
UInt16 GetDayOfMonth();
UInt16 GetDayOfWeek();
UInt16 GetDay(); //{ return GetDayOfWeek();}
UInt16 GetDayOfYear();
UInt16 GetHour();
UInt16 GetMinute();
UInt16 GetSecond();
protected:
time_t mCurrTime;
struct tm mLocalTime;
};
class TimerSpan
{
public:
TimerSpan();
~TimerSpan() {}
TimerSpan(UInt32 day, UInt32 hour, UInt32 minute, UInt32 second);
UInt32 GetTimer() { return mCurrTime; }
protected:
time_t mCurrTime;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -