mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2025-01-22 17:57:34 +01:00
Do not update ServerCpuStat too often.
This commit is contained in:
parent
67a477f471
commit
03a8573a03
@ -464,6 +464,9 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
double now = td::Time::now();
|
double now = td::Time::now();
|
||||||
if (now >= next_cron_time) {
|
if (now >= next_cron_time) {
|
||||||
|
if (now >= next_cron_time + 1.0) {
|
||||||
|
next_cron_time = now;
|
||||||
|
}
|
||||||
next_cron_time += 1.0;
|
next_cron_time += 1.0;
|
||||||
ServerCpuStat::update(now);
|
ServerCpuStat::update(now);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user