🐞 fix(fix monit server compile error): call gettimeofday directly

This commit is contained in:
yangwei
2024-11-27 19:50:50 +08:00
parent 35f3ec6e73
commit 0c1d52f5d2
3 changed files with 3 additions and 17 deletions

View File

@@ -194,16 +194,6 @@ static void stm_server_set_default_cfg(struct stellar_monitor_config *config)
config->output_interval_ms = STM_STAT_OUTPUT_INTERVAL_MS;
}
int stellar_monitor_set_gettime_callback(struct stellar_monitor *stm, int (*gettime_cb)(struct timeval *tv, void *tz))
{
if (NULL == gettime_cb)
{
return -1;
}
stm->gettime_cb = gettime_cb;
return 0;
}
struct stellar_monitor_config *stellar_monitor_config_new(const char *toml_file)
{
struct stellar_monitor_config *config = CALLOC(struct stellar_monitor_config, 1);
@@ -532,7 +522,6 @@ struct stellar_monitor *monitor_new(const char *toml_file, struct module_manager
stm->lock = stm_spinlock_new();
stm->worker_thread_num = module_manager_get_max_thread_num(mod_mgr);
assert(stm->worker_thread_num > 0);
stm->gettime_cb = gettimeofday;
stm->aide = stm_cmd_assistant_new();
if (stm_event_http_init(stm) < 0)
{