X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/02967a43024ce81912cd1ec96a800397457f8066..refs/heads/iannucci:/t4.cc?ds=sidebyside diff --git a/t4.cc b/t4.cc index 834136b..9b90f5d 100644 --- a/t4.cc +++ b/t4.cc @@ -1,6 +1,6 @@ -#include "t4.h" +#include "include/t4.h" #include -#include "rpc/rpc.h" +#include "include/rpc/rpc.h" using namespace std::chrono; @@ -9,7 +9,7 @@ t4_state *global; t4_state::t4_state(char log_prefix) : log_thread_prefix(log_prefix) { uint32_t seed = std::random_device()(); auto time = system_clock::now().time_since_epoch(); - auto ticks = duration_cast(time).count(); + auto ticks = time / 1ns; seed ^= (uint32_t)ticks; auto pid = getpid(); seed ^= (uint32_t)pid; @@ -17,7 +17,7 @@ t4_state::t4_state(char log_prefix) : log_thread_prefix(log_prefix) { seed ^= (uint32_t)tid; random_generator.seed(seed); // make sure the clock will read differently next time! - std::this_thread::sleep_for(microseconds(1)); + std::this_thread::sleep_for(1us); } t4_state::~t4_state() {