summaryrefslogtreecommitdiff
path: root/lib/common/BoxTime.h
diff options
context:
space:
mode:
authorMartin Ebourne <martin@ebourne.me.uk>2005-12-20 08:20:33 +0000
committerMartin Ebourne <martin@ebourne.me.uk>2005-12-20 08:20:33 +0000
commit8c4be43948dbe9a3bafd9d2fa8f350cb3359828e (patch)
treefc06a296bb9622bd5da7adad52e94d900aa48809 /lib/common/BoxTime.h
parentee95f5d73a7f2ca50d38dea6e862a6c683dfc8cc (diff)
Rationalise type usage for time values. Now:
Box time is always box_time_t seconds is time_t microseconds is uint64_t
Diffstat (limited to 'lib/common/BoxTime.h')
-rw-r--r--lib/common/BoxTime.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/common/BoxTime.h b/lib/common/BoxTime.h
index d166d6e7..398e6b1c 100644
--- a/lib/common/BoxTime.h
+++ b/lib/common/BoxTime.h
@@ -23,19 +23,15 @@ typedef uint64_t box_time_t;
box_time_t GetCurrentBoxTime();
-inline box_time_t SecondsToBoxTime(uint32_t Seconds)
+inline box_time_t SecondsToBoxTime(time_t Seconds)
{
return ((box_time_t)Seconds * MICRO_SEC_IN_SEC_LL);
}
-inline box_time_t SecondsToBoxTime(uint64_t Seconds)
-{
- return ((box_time_t)Seconds * MICRO_SEC_IN_SEC_LL);
-}
-inline box_time_t BoxTimeToSeconds(box_time_t Time)
+inline time_t BoxTimeToSeconds(box_time_t Time)
{
return Time / MICRO_SEC_IN_SEC_LL;
}
-inline box_time_t BoxTimeToMilliSeconds(box_time_t Time)
+inline uint64_t BoxTimeToMilliSeconds(box_time_t Time)
{
return Time / MILLI_SEC_IN_NANO_SEC_LL;
}