aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-09-30 18:06:12 +0000
committerlloyd <[email protected]>2009-09-30 18:06:12 +0000
commit1b0448fae6652a2da7f0de1fdcd2bbcda9836ca9 (patch)
tree6bbfa1c0bea58e937e94993a69461244ca5c0495
parentce2c86429a5b69ff059205f348732b7fbf4eafc8 (diff)
Change call to system_time to use std::chrono
-rw-r--r--src/rng/randpool/randpool.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rng/randpool/randpool.cpp b/src/rng/randpool/randpool.cpp
index fe83f4361..b018a0d17 100644
--- a/src/rng/randpool/randpool.cpp
+++ b/src/rng/randpool/randpool.cpp
@@ -8,9 +8,9 @@
#include <botan/randpool.h>
#include <botan/loadstor.h>
#include <botan/xor_buf.h>
-#include <botan/timer.h>
#include <botan/stl_util.h>
#include <algorithm>
+#include <chrono>
namespace Botan {
@@ -51,7 +51,9 @@ void Randpool::randomize(byte out[], u32bit length)
*/
void Randpool::update_buffer()
{
- const u64bit timestamp = system_time();
+ const u64bit timestamp =
+ std::chrono::duration_cast<std::chrono::nanoseconds>(
+ std::chrono::high_resolution_clock::now().time_since_epoch()).count();
for(u32bit i = 0; i != counter.size(); ++i)
if(++counter[i])