|
dl
|
时间 更多...
#include <dl_time.h>
Public 类型 | |
| enum | Type { ET_YEAR = 1 << 1 , ET_MONTH = 1 << 2 , ET_DAY = 1 << 3 , ET_HOUR = 1 << 4 , ET_MINUTE = 1 << 5 , ET_SECOND = 1 << 6 , ET_YMD = ET_YEAR | ET_MONTH | ET_DAY , ET_HMS = ET_HOUR | ET_MINUTE | ET_SECOND , ET_YMD_HMS = ET_YMD | ET_HMS } |
Public 成员函数 | |
| Time () | |
| FloatTime | GetDelta () |
| 返回帧间隔 | |
| unsigned | GetFPS () |
| 返回fps | |
| void | SetFPS (unsigned fps) |
| 设置fps | |
| FloatTime | GetCurrent () |
| 返回游戏运行累计时间 | |
| double | GetCurrent64 () |
| 返回游戏运行累计时间 | |
| time_t | GetFrameTimeStamp () |
| 返回当前帧时间戳 | |
| time_t | GetFrameTimeStampMs () |
| 返回当前帧时间戳(毫秒) | |
| unsigned | GetFrameTkc () |
| 返回当前帧tick(毫秒) | |
静态 Public 成员函数 | |
| static time_t | GetTimeStamp () |
| 返回时间戳 | |
| static time_t | GetTimeStampMs () |
| 返回时间戳(毫秒) | |
| static std::string | TimeStampDelta2String (time_t t) |
| 时间戳间隔 -> xx:xx:xx | |
| static std::string | TimeStamp2String (time_t t, Type type=ET_HMS, std::string_view year="-", std::string_view month="-", std::string_view day=" ", std::string_view hour=":", std::string_view minute=":", std::string_view second="") |
| 时间戳 -> 字符串 | |
| static std::string | ExTimeStamp2StringLog () |
| static void | Sleep (unsigned t=0) |
| 阻塞线程毫秒数(不精确) | |
友元 | |
| class | System |
| enum dl::Time::Type |
|
static |
返回时间戳
|
static |
返回时间戳(毫秒)
|
static |
阻塞线程毫秒数(不精确)
|
static |
时间戳 -> 字符串
|
static |
时间戳间隔 -> xx:xx:xx