Audacity 3.2.0
DynamicRangeProcessorClock.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 DynamicRangeProcessorClock.h
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
11#pragma once
12
13#include <chrono>
14#include <optional>
15
19class DYNAMIC_RANGE_PROCESSOR_API DynamicRangeProcessorClock final
20{
21public:
22 std::chrono::steady_clock::time_point GetNow() const;
23 void Pause();
24 void Resume();
25
26private:
27 std::optional<std::chrono::steady_clock::time_point> mPauseBegin;
28 std::chrono::duration<double> mElapsedWhilePaused =
29 std::chrono::duration<double>::zero();
30};
A clock that can be paused and resumed.
std::optional< std::chrono::steady_clock::time_point > mPauseBegin