szaszm commented on a change in pull request #958:
URL: https://github.com/apache/nifi-minifi-cpp/pull/958#discussion_r542421731



##########
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:
       This could be type erased with 
`std::function<std::chrono::milliseconds()>` instead of a class hierarchy for 
simplicity.




----------------------------------------------------------------
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]


Reply via email to