You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.4 KiB
C++

#pragma once
//工作时间管理
class CWorkTime
{
public:
CWorkTime(void);
~CWorkTime(void);
CString GetTimeSpanStr(CTimeSpan &TimeSpan);
void StartRecordTime();
void StopRecordTime();
CTimeSpan GetTimeSpan();
int GetTimeSpanMin(CTimeSpan &TimeSpan);
void StartExactTime();
CString GetCurTime(CString Separator);
CString GetCurDate(CString Separator);
CString GetTimeSpanStr();
CString GetDateTime(CString SeparatorDate,CString SeparatorTime);
double GetTimeSpanSecond();
CString GetDateStr(CTime Time,CString Separator);
void StartBackTime(double Time1,double Time2);
CString GetLeftTimes();
bool IsBackTimeEnd(int idx);
void DelayTime(unsigned int us);
CString GetCurYear();
CString GetCurMonth();
CString GetCurDay();
private:
CString Int2Str_LeftZero(int n);
private:
CTime m_StartTime;//开始计时的时间
LARGE_INTEGER m_ExactStart;//精确计时器开始
bool m_bRecordTime;//是否正在计时
double m_BackTime1Seconds;//倒计时秒数
double m_BackTime2Seconds;//倒计时秒数
bool m_bBackTime1End;//倒计时1 是否判断过
};
extern CWorkTime gWorkTime;