diff options
Diffstat (limited to 'lib/common/BoxTime.cpp')
-rwxr-xr-x | lib/common/BoxTime.cpp | 32 |
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)); +} + + |