summaryrefslogtreecommitdiff
path: root/lib/common/BoxTime.cpp
diff options
context:
space:
mode:
authorBen Summers <ben@fluffy.co.uk>2005-10-14 08:50:54 +0000
committerBen Summers <ben@fluffy.co.uk>2005-10-14 08:50:54 +0000
commit99f8ce096bc5569adbfea1911dbcda24c28d8d8b (patch)
tree049c302161fea1f2f6223e1e8f3c40d9e8aadc8b /lib/common/BoxTime.cpp
Box Backup 0.09 with a few tweeks
Diffstat (limited to 'lib/common/BoxTime.cpp')
-rwxr-xr-xlib/common/BoxTime.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/common/BoxTime.cpp b/lib/common/BoxTime.cpp
new file mode 100755
index 00000000..feada309
--- /dev/null
+++ b/lib/common/BoxTime.cpp
@@ -0,0 +1,32 @@
+// --------------------------------------------------------------------------
+//
+// File
+// Name: BoxTime.cpp
+// Purpose: Time for the box
+// Created: 2003/10/08
+//
+// --------------------------------------------------------------------------
+
+#include "Box.h"
+
+#include <time.h>
+
+#include "BoxTime.h"
+
+#include "MemLeakFindOn.h"
+
+// --------------------------------------------------------------------------
+//
+// Function
+// Name: GetCurrentBoxTime()
+// Purpose: Returns the current time as a box time. (1 sec precision)
+// Created: 2003/10/08
+//
+// --------------------------------------------------------------------------
+box_time_t GetCurrentBoxTime()
+{
+ ASSERT(sizeof(uint32_t) == sizeof(time_t));
+ return SecondsToBoxTime((uint32_t)time(0));
+}
+
+