mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
Fix usage of broker::convert(double,timespan)
This commit is contained in:
parent
0728676fd6
commit
a266d32dca
1 changed files with 3 additions and 3 deletions
|
@ -2050,8 +2050,8 @@ void Manager::PrepareForwarding(const std::string& name)
|
||||||
|
|
||||||
void Manager::SetMetricsExportInterval(double value)
|
void Manager::SetMetricsExportInterval(double value)
|
||||||
{
|
{
|
||||||
broker::timespan ts;
|
using dbl_seconds = std::chrono::duration<double>;
|
||||||
if ( broker::convert(value, ts) )
|
auto ts = std::chrono::duration_cast<broker::timespan>(dbl_seconds{value});
|
||||||
bstate->endpoint.metrics_exporter().set_interval(ts);
|
bstate->endpoint.metrics_exporter().set_interval(ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue