adamdebreceni commented on a change in pull request #958: URL: https://github.com/apache/nifi-minifi-cpp/pull/958#discussion_r542433430
########## File path: libminifi/include/utils/TimeUtil.h ########## @@ -53,6 +53,29 @@ inline uint64_t getTimeNano() { return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::system_clock::now().time_since_epoch()).count(); } +/** + * Mockable clock classes + */ +class Clock { + public: + virtual ~Clock() = default; + virtual std::chrono::milliseconds timeSinceEpoch() const = 0; Review comment: regarding the `std::function<...>`, I would keep the `Clock` class, as IMO it better describes its usage ---------------------------------------------------------------- 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: us...@infra.apache.org