From 4e9e245a034a17a1e1414171db5fe68d202723b2 Mon Sep 17 00:00:00 2001 From: Vito <5780819+Tapanito@users.noreply.github.com> Date: Tue, 24 Jun 2025 14:55:19 +0200 Subject: [PATCH] removes unused clock --- src/test/overlay/clock.h | 83 ---------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 src/test/overlay/clock.h diff --git a/src/test/overlay/clock.h b/src/test/overlay/clock.h deleted file mode 100644 index 25dc69bace..0000000000 --- a/src/test/overlay/clock.h +++ /dev/null @@ -1,83 +0,0 @@ -//------------------------------------------------------------------------------ -/* - This file is part of rippled: https://github.com/ripple/rippled - Copyright (c) 2025 Ripple Labs Inc. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ -//============================================================================== - -#ifndef RIPPLE_TEST_OVERLAY_CLOCK_H_INCLUDED -#define RIPPLE_TEST_OVERLAY_CLOCK_H_INCLUDED - -#include - -#include -#include -#include - -namespace ripple { - -namespace test { - -using namespace std::chrono; - -/** Manually advanced clock. */ -class ManualClock -{ -public: - typedef uint64_t rep; - typedef std::milli period; - typedef std::chrono::duration duration; - typedef std::chrono::time_point time_point; - inline static bool const is_steady = false; - - static void - advance(duration d) noexcept - { - now_ += d; - } - - static void - randAdvance(milliseconds min, milliseconds max) - { - now_ += randDuration(min, max); - } - - static void - reset() noexcept - { - now_ = time_point(seconds(0)); - } - - static time_point - now() noexcept - { - return now_; - } - - static duration - randDuration(milliseconds min, milliseconds max) - { - return duration(milliseconds(rand_int(min.count(), max.count()))); - } - - explicit ManualClock() = default; - -private: - inline static time_point now_ = time_point(seconds(0)); -}; -} // namespace test -} // namespace ripple - -#endif \ No newline at end of file