1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine get_heartbeat_interval in time unit

This commit is contained in:
winlin 2019-04-09 08:47:18 +08:00
parent 5937304717
commit 60f9561d2d
4 changed files with 15 additions and 6 deletions

View file

@ -910,7 +910,7 @@ srs_error_t SrsServer::do_cycle()
}
// the interval in config.
int heartbeat_max_resolution = (int)(_srs_config->get_heartbeat_interval() * SRS_UTIME_MILLISECONDS / SRS_SYS_CYCLE_INTERVAL);
int heartbeat_max_resolution = (int)(_srs_config->get_heartbeat_interval() / SRS_SYS_CYCLE_INTERVAL);
// dynamic fetch the max.
int dynamic_max = srs_max(max, heartbeat_max_resolution);