fgerlits commented on a change in pull request #958:
URL: https://github.com/apache/nifi-minifi-cpp/pull/958#discussion_r542436009
##########
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:
Yes, that would be another way of doing it, but I'm not sure it would be
simpler. Do you think it would be so much simpler that it's worth rewriting
this?
----------------------------------------------------------------
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]