bakaid commented on a change in pull request #721: MINIFICPP-1135 - Add a
watchdog to schedulingAgent to warn in case of…
URL: https://github.com/apache/nifi-minifi-cpp/pull/721#discussion_r372863327
##########
File path: libminifi/src/SchedulingAgent.cpp
##########
@@ -125,6 +138,17 @@ bool SchedulingAgent::onTrigger(const
std::shared_ptr<core::Processor> &processo
return false;
}
+void SchedulingAgent::watchDogFunc() {
+ std::lock_guard<std::mutex> lock(watchdog_mtx_);
+ auto now = std::chrono::system_clock::now();
Review comment:
std::chrono::system_clock is not guaranteed to be monotonic, and it is
indeed not in DST situations, manually setting the time or when using NTP. This
can cause false positives and false negatives.
I think std::chrono::steady_clock should be used here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services