Audacity 3.2.0
DynamicRangeProcessorClock.cpp
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.cpp
7
8 Matthieu Hodgkinson
9
10**********************************************************************/
12
13std::chrono::steady_clock::time_point DynamicRangeProcessorClock::GetNow() const
14{
15 return std::chrono::steady_clock::now() -
16 std::chrono::duration_cast<std::chrono::steady_clock::duration>(
18}
19
21{
22 mPauseBegin = std::chrono::steady_clock::now();
23}
24
26{
27 if (!mPauseBegin.has_value())
28 return;
29 mElapsedWhilePaused += std::chrono::steady_clock::now() - *mPauseBegin;
30}
std::chrono::duration< double > mElapsedWhilePaused
std::optional< std::chrono::steady_clock::time_point > mPauseBegin
std::chrono::steady_clock::time_point GetNow() const