Stroika Library 3.0d18
 
Loading...
Searching...
No Matches
OperationalStatistics.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2021. All rights reserved
3 */
4
5namespace Stroika::Samples::HTMLUI {
6
7 /*
8 ********************************************************************************
9 ***************** OperationalStatisticsMgr::ProcessAPICmd **********************
10 ********************************************************************************
11 */
12 inline OperationalStatisticsMgr::ProcessAPICmd::ProcessAPICmd ()
13 : fStart_{Time::GetTickCount ()}
14 {
15 }
16
17 /*
18 ********************************************************************************
19 ************************** OperationalStatisticsMgr ****************************
20 ********************************************************************************
21 */
22 inline void OperationalStatisticsMgr::Add_ (const Rec_& r)
23 {
24 lock_guard lk{fMutex_};
25 ++fNextHistory_;
26 if (fNextHistory_ == Memory::NEltsOf (fRollingHistory_)) {
27 fNextHistory_ = 0;
28 }
29 Assert (fNextHistory_ < Memory::NEltsOf (fRollingHistory_));
30 fRollingHistory_[fNextHistory_] = r;
31 }
32
33}
TimePointSeconds GetTickCount() noexcept
get the current (monotonically increasing) time - from RealtimeClock
Definition Realtime.inl:16