Module: check_mk
Branch: master
Commit: c6667d26cc62ae4b06f809b78a7954b55b4d8bc0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c6667d26cc62ae…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Feb 27 14:06:15 2017 +0100
Introduce minutes_d type alias, improving readability.
Change-Id: I2e90933c1705c0826eb818a47f19f0727a179d95
---
livestatus/src/ChronoUtils.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/livestatus/src/ChronoUtils.h b/livestatus/src/ChronoUtils.h
index ea1dffb..551f62a 100644
--- a/livestatus/src/ChronoUtils.h
+++ b/livestatus/src/ChronoUtils.h
@@ -31,8 +31,11 @@
#include <cstdlib>
#include <ctime>
#include <iomanip>
+#include <ratio>
#include <string>
+using minutes_d = std::chrono::duration<double, std::ratio<60>>;
+
inline double elapsed_ms_since(std::chrono::system_clock::time_point then) {
using namespace std::chrono;
return duration_cast<duration<double, std::milli>>(system_clock::now() -