Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Aug 26, 2024
1 parent cfddf7c commit 72fc6b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/SleeperPosix.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <csignal>
#include <functional>
#include <memory>
#include <stdexcept>
#include <thread>

#include "Sleeper.hpp"
Expand Down Expand Up @@ -63,7 +64,7 @@ namespace util {

void Sleeper::sleep_until(const std::chrono::steady_clock::time_point& target) {
if (state->sleeping_thread != pthread_t{}) {
throw std::runtime_error("Cannot sleep multiple times on the same Sleeper object");
throw std::logic_error("Sleeper object cannot be used to sleep multiple times");
}

// Store the current sleeping thread so we can wake it up if we need to
Expand Down
1 change: 1 addition & 0 deletions tests/test_util/TimeUnit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#endif

#include <chrono>
#include <cmath>

namespace test_util {

Expand Down

0 comments on commit 72fc6b5

Please sign in to comment.