diff --git a/fortuna.cpp b/fortuna.cpp index 8b654aa..fa5ff6d 100644 --- a/fortuna.cpp +++ b/fortuna.cpp @@ -80,15 +80,15 @@ namespace fortuna { fmt::print("[i] fortuna: starting generator service\n"); int i{0}; uint sleep_time{1000}; // in ms - auto now{fortuna::Util::current_time()}; + std::chrono::system_clock::time_point time_point; while(true) { fmt::print("sleeping [{}]\n", i); ++i; - now = fortuna::Util::current_time(); - fmt::print("[*] g: @{}\n", now); + time_point = fortuna::Util::current_time(); + fmt::print("[*] g: @{}\n", time_point); std::this_thread::sleep_until( - now + std::chrono::milliseconds(sleep_time) + time_point + std::chrono::milliseconds(sleep_time) ); } }