Zth (libzth)
|
Measure the load of some activity. More...
#include <perf.h>
Public Types | |
typedef T | type |
Public Member Functions | |
Load (type rc=1) noexcept | |
type | rc () const noexcept |
void | setRc (type rc) noexcept |
void | start (Timestamp const &now=Timestamp::now()) noexcept |
void | stop (Timestamp const &now=Timestamp::now()) noexcept |
bool | isActive () const noexcept |
type | load () const noexcept |
type | load (Timestamp const &now) const noexcept |
void | idle (type dt_s) noexcept |
void | active (type dt_s) noexcept |
Protected Member Functions | |
type | idle (type load, type dt_s) const noexcept |
type | active (type load, type dt_s) const noexcept |
type | alpha (type dt_s) const noexcept |
Measure the load of some activity.
This is a first-order low-pass filter. The RC-time is to be provided to the constructor.
The activity is measured by means of calls to idle() and active().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |