🐞 fix(fix monit server compile error): call gettimeofday directly
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user