]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/OS/Chrono.h
yet another refactoring
[cpPlugins.git] / lib / cpPlugins / OS / Chrono.h
diff --git a/lib/cpPlugins/OS/Chrono.h b/lib/cpPlugins/OS/Chrono.h
new file mode 100644 (file)
index 0000000..e012406
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __cpPlugins__OS__Chrono__h__
+#define __cpPlugins__OS__Chrono__h__
+
+#include <cpPlugins/Config.h>
+#include <chrono>
+
+// -------------------------------------------------------------------------
+#define cpPlugins_CHRONO                                        \
+  std::chrono::duration_cast< std::chrono::milliseconds >(      \
+    std::chrono::system_clock::now( ).time_since_epoch( )       \
+    ).count( )
+
+#endif // __cpPlugins__OS__Chrono__h__
+
+// eof - $RCSfile$