@@ -21,7 +21,7 @@ Expected<DatadogAgentConfig> load_datadog_agent_env_config() {
2121
2222 if (auto raw_rc_poll_interval_value =
2323 lookup (environment::DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS)) {
24- auto res = parse_int (*raw_rc_poll_interval_value, 10 );
24+ auto res = parse_double (*raw_rc_poll_interval_value);
2525 if (auto error = res.if_error ()) {
2626 return error->with_prefix (
2727 " DatadogAgent: Remote Configuration poll interval error " );
@@ -114,12 +114,13 @@ Expected<FinalizedDatadogAgentConfig> finalize_config(
114114 " milliseconds." };
115115 }
116116
117- if (int rc_poll_interval_seconds =
117+ if (double rc_poll_interval_seconds =
118118 value_or (env_config->remote_configuration_poll_interval_seconds ,
119- user_config.remote_configuration_poll_interval_seconds , 5 );
120- rc_poll_interval_seconds > 0 ) {
119+ user_config.remote_configuration_poll_interval_seconds , 5.0 );
120+ rc_poll_interval_seconds >= 0. 0 ) {
121121 result.remote_configuration_poll_interval =
122- std::chrono::seconds (rc_poll_interval_seconds);
122+ std::chrono::duration_cast<std::chrono::milliseconds>(
123+ std::chrono::duration<double >(rc_poll_interval_seconds));
123124 } else {
124125 return Error{Error::DATADOG_AGENT_INVALID_REMOTE_CONFIG_POLL_INTERVAL,
125126 " DatadogAgent: Remote Configuration poll interval must be a "
0 commit comments