diff options
author | snaury <snaury@ydb.tech> | 2023-05-17 00:09:28 +0300 |
---|---|---|
committer | snaury <snaury@ydb.tech> | 2023-05-17 00:09:28 +0300 |
commit | 56a6dcb981398ed4ff100c1cee255d0737c80ec3 (patch) | |
tree | 5944876280d020cf70fdabc149d704cdeb8694ea /library/cpp/actors/testlib | |
parent | e95347322acfd16b2fd57c40f30718d6b3e42631 (diff) | |
download | ydb-56a6dcb981398ed4ff100c1cee255d0737c80ec3.tar.gz |
Switch TMonotonic to CLOCK_BOOTTIME instead of a separate type
Diffstat (limited to 'library/cpp/actors/testlib')
-rw-r--r-- | library/cpp/actors/testlib/test_runtime.cpp | 26 | ||||
-rw-r--r-- | library/cpp/actors/testlib/test_runtime.h | 4 |
2 files changed, 0 insertions, 30 deletions
diff --git a/library/cpp/actors/testlib/test_runtime.cpp b/library/cpp/actors/testlib/test_runtime.cpp index 2ec0b27ddce..6fedca1cd22 100644 --- a/library/cpp/actors/testlib/test_runtime.cpp +++ b/library/cpp/actors/testlib/test_runtime.cpp @@ -246,20 +246,6 @@ namespace NActors { TTestActorRuntimeBase& Runtime; }; - class TTestActorRuntimeBase::TBootTimeProvider : public IBootTimeProvider { - public: - TBootTimeProvider(TTestActorRuntimeBase& runtime) - : Runtime(runtime) - { } - - TBootTime Now() override { - return Runtime.GetCurrentBootTime(); - } - - private: - TTestActorRuntimeBase& Runtime; - }; - class TTestActorRuntimeBase::TSchedulerThreadStub : public ISchedulerThread { public: TSchedulerThreadStub(TTestActorRuntimeBase* runtime, TTestActorRuntimeBase::TNodeDataBase* node) @@ -510,7 +496,6 @@ namespace NActors { , RandomProvider(CreateDeterministicRandomProvider(DefaultRandomSeed)) , TimeProvider(new TTimeProvider(*this)) , MonotonicTimeProvider(new TMonotonicTimeProvider(*this)) - , BootTimeProvider(new TBootTimeProvider(*this)) , ShouldContinue() , CurrentTimestamp(0) , DispatchTimeout(DEFAULT_DISPATCH_TIMEOUT) @@ -844,12 +829,6 @@ namespace NActors { return TMonotonic::MicroSeconds(CurrentTimestamp); } - TBootTime TTestActorRuntimeBase::GetCurrentBootTime() const { - TGuard<TMutex> guard(Mutex); - Y_VERIFY(!UseRealThreads); - return TBootTime::MicroSeconds(CurrentTimestamp); - } - void TTestActorRuntimeBase::UpdateCurrentTime(TInstant newTime) { static int counter = 0; ++counter; @@ -881,11 +860,6 @@ namespace NActors { return MonotonicTimeProvider; } - TIntrusivePtr<IBootTimeProvider> TTestActorRuntimeBase::GetBootTimeProvider() { - Y_VERIFY(!UseRealThreads); - return BootTimeProvider; - } - ui32 TTestActorRuntimeBase::GetNodeId(ui32 index) const { Y_VERIFY(index < NodeCount); return FirstNodeId + index; diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h index a5d6b3b6e9a..0c1e4207cc7 100644 --- a/library/cpp/actors/testlib/test_runtime.h +++ b/library/cpp/actors/testlib/test_runtime.h @@ -190,7 +190,6 @@ namespace NActors { class TExecutorPoolStub; class TTimeProvider; class TMonotonicTimeProvider; - class TBootTimeProvider; enum class EEventAction { PROCESS, @@ -233,10 +232,8 @@ namespace NActors { void SetLogPriority(NActors::NLog::EComponent component, NActors::NLog::EPriority priority); TIntrusivePtr<ITimeProvider> GetTimeProvider(); TIntrusivePtr<IMonotonicTimeProvider> GetMonotonicTimeProvider(); - TIntrusivePtr<IBootTimeProvider> GetBootTimeProvider(); TInstant GetCurrentTime() const; TMonotonic GetCurrentMonotonicTime() const; - TBootTime GetCurrentBootTime() const; void UpdateCurrentTime(TInstant newTime); void AdvanceCurrentTime(TDuration duration); void AddLocalService(const TActorId& actorId, const TActorSetupCmd& cmd, ui32 nodeIndex = 0); @@ -552,7 +549,6 @@ namespace NActors { TIntrusivePtr<IRandomProvider> RandomProvider; TIntrusivePtr<ITimeProvider> TimeProvider; TIntrusivePtr<IMonotonicTimeProvider> MonotonicTimeProvider; - TIntrusivePtr<IBootTimeProvider> BootTimeProvider; protected: struct TNodeDataBase: public TThrRefBase { |