summaryrefslogtreecommitdiff
path: root/lib/common/BoxTime.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common/BoxTime.h')
-rw-r--r--lib/common/BoxTime.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/common/BoxTime.h b/lib/common/BoxTime.h
index 6681bbbd..d688ff10 100644
--- a/lib/common/BoxTime.h
+++ b/lib/common/BoxTime.h
@@ -11,15 +11,25 @@
#define BOXTIME__H
// Time is presented as an unsigned 64 bit integer, in microseconds
+<<<<<<< HEAD
typedef uint64_t box_time_t;
+=======
+typedef int64_t box_time_t;
+>>>>>>> 0.12
#define NANO_SEC_IN_SEC (1000000000LL)
#define NANO_SEC_IN_USEC (1000)
#define NANO_SEC_IN_USEC_LL (1000LL)
#define MICRO_SEC_IN_SEC (1000000)
#define MICRO_SEC_IN_SEC_LL (1000000LL)
+<<<<<<< HEAD
#define MILLI_SEC_IN_NANO_SEC (1000)
#define MILLI_SEC_IN_NANO_SEC_LL (1000LL)
+=======
+#define MICRO_SEC_IN_MILLI_SEC (1000)
+#define MILLI_SEC_IN_SEC (1000)
+#define MILLI_SEC_IN_SEC_LL (1000LL)
+>>>>>>> 0.12
box_time_t GetCurrentBoxTime();
@@ -27,13 +37,24 @@ inline box_time_t SecondsToBoxTime(time_t Seconds)
{
return ((box_time_t)Seconds * MICRO_SEC_IN_SEC_LL);
}
+<<<<<<< HEAD
+=======
+inline uint64_t MilliSecondsToBoxTime(int64_t milliseconds)
+{
+ return ((box_time_t)milliseconds * 1000);
+}
+>>>>>>> 0.12
inline time_t BoxTimeToSeconds(box_time_t Time)
{
return Time / MICRO_SEC_IN_SEC_LL;
}
inline uint64_t BoxTimeToMilliSeconds(box_time_t Time)
{
+<<<<<<< HEAD
return Time / MILLI_SEC_IN_NANO_SEC_LL;
+=======
+ return Time / MILLI_SEC_IN_SEC_LL;
+>>>>>>> 0.12
}
inline uint64_t BoxTimeToMicroSeconds(box_time_t Time)
{
@@ -43,4 +64,9 @@ inline uint64_t BoxTimeToMicroSeconds(box_time_t Time)
std::string FormatTime(box_time_t time, bool includeDate,
bool showMicros = false);
+<<<<<<< HEAD
+=======
+void ShortSleep(box_time_t duration, bool logDuration);
+
+>>>>>>> 0.12
#endif // BOXTIME__H