So many changes. Broken.
[invirt/third/libt4.git] / t4.cc
diff --git a/t4.cc b/t4.cc
index 834136b..9b90f5d 100644 (file)
--- a/t4.cc
+++ b/t4.cc
@@ -1,6 +1,6 @@
-#include "t4.h"
+#include "include/t4.h"
 #include <unistd.h>
 #include <unistd.h>
-#include "rpc/rpc.h"
+#include "include/rpc/rpc.h"
 
 using namespace std::chrono;
 
 
 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();
 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<nanoseconds>(time).count();
+    auto ticks = time / 1ns;
     seed ^= (uint32_t)ticks;
     auto pid = getpid();
     seed ^= (uint32_t)pid;
     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!
     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() {
 }
 
 t4_state::~t4_state() {