aboutsummaryrefslogtreecommitdiffstats
path: root/modules/tm_unix/tm_unix.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-05-18 18:33:19 +0000
committerlloyd <[email protected]>2006-05-18 18:33:19 +0000
commita2c99d3270eb73ef2db5704fc54356c6b75096f8 (patch)
treead3d6c4fcc8dd0f403f8105598943616246fe172 /modules/tm_unix/tm_unix.cpp
Initial checkin1.5.6
Diffstat (limited to 'modules/tm_unix/tm_unix.cpp')
-rw-r--r--modules/tm_unix/tm_unix.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/tm_unix/tm_unix.cpp b/modules/tm_unix/tm_unix.cpp
new file mode 100644
index 000000000..3cf6928be
--- /dev/null
+++ b/modules/tm_unix/tm_unix.cpp
@@ -0,0 +1,22 @@
+/*************************************************
+* Unix Timer Source File *
+* (C) 1999-2006 The Botan Project *
+*************************************************/
+
+#include <botan/tm_unix.h>
+#include <botan/util.h>
+#include <sys/time.h>
+
+namespace Botan {
+
+/*************************************************
+* Get the timestamp *
+*************************************************/
+u64bit Unix_Timer::clock() const
+ {
+ struct timeval tv;
+ gettimeofday(&tv, 0);
+ return combine_timers(tv.tv_sec, tv.tv_usec, 1000000);
+ }
+
+}