summaryrefslogtreecommitdiff
path: root/zen/tick_count.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2016-03-16 21:31:24 +0100
committerDaniel Wilhelm <daniel@wili.li>2016-03-16 21:31:24 +0100
commit89621addb4a7c87d2e3f3e7462e3c690cf71de71 (patch)
tree008b5dea7624ee1eeb57ff82c45fdf1afcab3b08 /zen/tick_count.h
parent7.5 (diff)
downloadFreeFileSync-89621addb4a7c87d2e3f3e7462e3c690cf71de71.tar.gz
FreeFileSync-89621addb4a7c87d2e3f3e7462e3c690cf71de71.tar.bz2
FreeFileSync-89621addb4a7c87d2e3f3e7462e3c690cf71de71.zip
7.6
Diffstat (limited to 'zen/tick_count.h')
-rw-r--r--zen/tick_count.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/zen/tick_count.h b/zen/tick_count.h
index b5667c6c..647876fb 100644
--- a/zen/tick_count.h
+++ b/zen/tick_count.h
@@ -4,8 +4,8 @@
// * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved *
// **************************************************************************
-#ifndef ZEN_TICK_COUNT_HEADER_3807326
-#define ZEN_TICK_COUNT_HEADER_3807326
+#ifndef TICK_COUNT_H_3807326223463457
+#define TICK_COUNT_H_3807326223463457
#include <cstdint>
#include "type_traits.h"
@@ -13,18 +13,12 @@
#ifdef ZEN_WIN
#include "win.h" //includes "windows.h"
-
#elif defined ZEN_LINUX
#include <time.h> //Posix ::clock_gettime()
-
#elif defined ZEN_MAC
#include <mach/mach_time.h>
#endif
-//template <class T> inline
-//T dist(T a, T b)
-//{
-// return a > b ? a - b : b - a;
-//}
+
namespace zen
{
@@ -55,7 +49,7 @@ public:
typedef uint64_t NativeVal;
#endif
- TickVal() : val_() {}
+ TickVal() {}
explicit TickVal(const NativeVal& val) : val_(val) {}
inline friend
@@ -92,7 +86,7 @@ public:
bool isValid() const { return dist(*this, TickVal()) != 0; }
private:
- NativeVal val_;
+ NativeVal val_ {};
};
@@ -144,4 +138,4 @@ TickVal getTicks() //return !isValid() on error
}
}
-#endif //ZEN_TICK_COUNT_HEADER_3807326
+#endif //TICK_COUNT_H_3807326223463457
bgstack15