aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-04-07 00:48:39 +0000
committerlloyd <[email protected]>2008-04-07 00:48:39 +0000
commitd5152bdccb28ae6286cac29b57199f7e58159608 (patch)
tree2c9d2a4b84d6ead8014e365cd2c0971343de763f
parent404ef9b8b7bc57a0eedf0cfe321b9a49643aecd3 (diff)
Move combine_timers from a free-standing function in util.h to a private
static function of the Timer base class - since that is the only code which actually needs to access it.
-rw-r--r--include/timers.h2
-rw-r--r--include/util.h1
-rw-r--r--src/timers.cpp3
3 files changed, 3 insertions, 3 deletions
diff --git a/include/timers.h b/include/timers.h
index 040e23688..afdbc7f21 100644
--- a/include/timers.h
+++ b/include/timers.h
@@ -18,6 +18,8 @@ class Timer
public:
virtual u64bit clock() const;
virtual ~Timer() {}
+ private:
+ static u64bit combine_timers(u32bit, u32bit, u32bit);
};
}
diff --git a/include/util.h b/include/util.h
index 5edea3506..2d9a70433 100644
--- a/include/util.h
+++ b/include/util.h
@@ -27,7 +27,6 @@ void unlock_mem(void*, u32bit);
*************************************************/
u32bit round_up(u32bit, u32bit);
u32bit round_down(u32bit, u32bit);
-u64bit combine_timers(u32bit, u32bit, u32bit);
/*************************************************
* Work Factor Estimates *
diff --git a/src/timers.cpp b/src/timers.cpp
index ea2ec9dfa..da02e46c6 100644
--- a/src/timers.cpp
+++ b/src/timers.cpp
@@ -5,7 +5,6 @@
#include <botan/timers.h>
#include <botan/libstate.h>
-#include <botan/util.h>
#include <ctime>
namespace Botan {
@@ -34,7 +33,7 @@ u64bit Timer::clock() const
/*************************************************
* Combine a two time values into a single one *
*************************************************/
-u64bit combine_timers(u32bit seconds, u32bit parts, u32bit parts_hz)
+u64bit Timer::combine_timers(u32bit seconds, u32bit parts, u32bit parts_hz)
{
const u64bit NANOSECONDS_UNITS = 1000000000;
parts *= (NANOSECONDS_UNITS / parts_hz);