CMCore/inc/hgl/Time.h

26 lines
1.5 KiB
C
Raw Permalink Normal View History

2019-08-19 19:19:58 +08:00
#ifndef HGL_TIME_INCLUDE
#define HGL_TIME_INCLUDE
#include<hgl/type/DataType.h>
namespace hgl //时间
{
2025-04-24 22:44:09 +08:00
using PreciseTime=double;
2019-08-19 19:19:58 +08:00
int GetTimeZone(); ///<返回时区的时差(单位:秒)
uint64 GetMilliStartTime(); ///<取得毫秒程序启动时间(单位1/1000秒)
uint64 GetMicroStartTime(); ///<取得微秒程序启动时间(单位1/1000000秒)
2025-04-24 22:44:09 +08:00
PreciseTime GetPreciseStartTime(); ///<取得秒程序启动时间(单位:秒)
2019-08-19 19:19:58 +08:00
uint64 GetTime(); ///<取得当前时间(单位1/1000秒)
uint64 GetMicroTime(); ///<取得当前时间(单位1/1000000秒)
2025-04-24 22:44:09 +08:00
PreciseTime GetPreciseTime(); ///<取得当前时间(单位:秒)
2019-08-19 19:19:58 +08:00
2025-04-24 22:44:09 +08:00
PreciseTime GetLocaPreciseTime(); ///<取得本地当前时间(单位:秒)
2019-08-19 19:19:58 +08:00
2025-04-24 22:44:09 +08:00
void WaitTime(const PreciseTime &); ///<等待一定时间(单位:秒)
2019-08-19 19:19:58 +08:00
}//namespace hgl
#endif//HGL_TIME_INCLUDE