aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-29 00:03:19 +0000
committerlloyd <[email protected]>2008-09-29 00:03:19 +0000
commit8269e2897e0a652bbd949d38b74873976a98adeb (patch)
tree2ea103d5d7d4cf9073b4ac06cb5d5f7c62be16a6 /src
parentab81a9d95264914ab34cb4e7134f827e3128c326 (diff)
Move timer base class into a module, add dep from other timer modules
Diffstat (limited to 'src')
-rw-r--r--src/timer/cpu_counter/modinfo.txt5
-rw-r--r--src/timer/gettimeofday/modinfo.txt5
-rw-r--r--src/timer/posix_rt/modinfo.txt5
-rw-r--r--src/timer/timer_base/modinfo.txt10
-rw-r--r--src/timer/timer_base/timers.cpp (renamed from src/timers.cpp)0
-rw-r--r--src/timer/timer_base/timers.h29
-rw-r--r--src/timer/win32_query_perf_ctr/modinfo.txt5
7 files changed, 59 insertions, 0 deletions
diff --git a/src/timer/cpu_counter/modinfo.txt b/src/timer/cpu_counter/modinfo.txt
index d5583c0d7..2a64bedee 100644
--- a/src/timer/cpu_counter/modinfo.txt
+++ b/src/timer/cpu_counter/modinfo.txt
@@ -29,3 +29,8 @@ ia64 # ar.itc
s390x
hppa
</arch>
+
+<requires>
+timer_base
+</requires>
+
diff --git a/src/timer/gettimeofday/modinfo.txt b/src/timer/gettimeofday/modinfo.txt
index 495914589..c079dfd58 100644
--- a/src/timer/gettimeofday/modinfo.txt
+++ b/src/timer/gettimeofday/modinfo.txt
@@ -25,3 +25,8 @@ qnx
solaris
tru64
</os>
+
+<requires>
+timer_base
+</requires>
+
diff --git a/src/timer/posix_rt/modinfo.txt b/src/timer/posix_rt/modinfo.txt
index e9298a81c..fb1870988 100644
--- a/src/timer/posix_rt/modinfo.txt
+++ b/src/timer/posix_rt/modinfo.txt
@@ -21,3 +21,8 @@ linux
#netbsd
#openbsd
</os>
+
+<requires>
+timer_base
+</requires>
+
diff --git a/src/timer/timer_base/modinfo.txt b/src/timer/timer_base/modinfo.txt
new file mode 100644
index 000000000..3637d4c94
--- /dev/null
+++ b/src/timer/timer_base/modinfo.txt
@@ -0,0 +1,10 @@
+realname "Timer Base Class"
+
+define TIMER
+
+load_on auto
+
+<add>
+timers.cpp
+timers.h
+</add>
diff --git a/src/timers.cpp b/src/timer/timer_base/timers.cpp
index 4f482916f..4f482916f 100644
--- a/src/timers.cpp
+++ b/src/timer/timer_base/timers.cpp
diff --git a/src/timer/timer_base/timers.h b/src/timer/timer_base/timers.h
new file mode 100644
index 000000000..253f71f6b
--- /dev/null
+++ b/src/timer/timer_base/timers.h
@@ -0,0 +1,29 @@
+/*************************************************
+* Timestamp Functions Header File *
+* (C) 1999-2007 Jack Lloyd *
+*************************************************/
+
+#ifndef BOTAN_TIMERS_H__
+#define BOTAN_TIMERS_H__
+
+#include <botan/rng.h>
+
+namespace Botan {
+
+/*************************************************
+* Timer Interface *
+*************************************************/
+class BOTAN_DLL Timer : public EntropySource
+ {
+ public:
+ virtual u64bit clock() const;
+ u32bit slow_poll(byte[], u32bit);
+
+ virtual ~Timer() {}
+ protected:
+ static u64bit combine_timers(u32bit, u32bit, u32bit);
+ };
+
+}
+
+#endif
diff --git a/src/timer/win32_query_perf_ctr/modinfo.txt b/src/timer/win32_query_perf_ctr/modinfo.txt
index 74c4a59ea..e956f99c5 100644
--- a/src/timer/win32_query_perf_ctr/modinfo.txt
+++ b/src/timer/win32_query_perf_ctr/modinfo.txt
@@ -18,3 +18,8 @@ windows
<libs>
windows -> user32
</libs>
+
+<requires>
+timer_base
+</requires>
+