struct TICKS {
DWORD start, now, interval;
bool operator==(TICKS ticks) { return now == ticks.now; }
bool isNow() {
if ((now - start) >= interval) {
start = now;
return true;
}
return false;
}
void update() { now = GetTickCount(); }
TICKS(DWORD interval)
: start(GetTickCount()), now(start), interval(interval) {}
TICKS() {}
};现成计时器
文章信息与版本
文章信息
- 收录
- 2025年12月12日
- 更新
- 2025年12月12日
- 篇幅
- 约 1 分钟