-#include "t4.h"
+#include "include/t4.h"
#include <unistd.h>
-#include "rpc/rpc.h"
+#include "include/rpc/rpc.h"
using namespace std::chrono;
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)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() {