Skip to content

Commit

Permalink
feat: stop measurement if it reached limit (#231)
Browse files Browse the repository at this point in the history
Signed-off-by: David Bensoussan <d.bensoussan@proton.me>
  • Loading branch information
Minipada authored Jun 13, 2023
1 parent f708e20 commit 85c07a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dc_measurements/include/dc_measurements/measurement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ class Measurement : public dc_core::Measurement
{
condition_counter_published_ = 0;
}

if (init_max_measurements_ != 0 && init_max_measurements_ != -1 && condition_max_measurements_ < 0 &&
init_max_measurements_ == init_counter_published_)
{
collect_timer_.reset();
}
}
else
{
Expand Down

0 comments on commit 85c07a3

Please sign in to comment.