| 16 | using namespace std::chrono_literals; |
| 17 | |
| 18 | Throttle::Throttle(IExecutor& executor, int callsPerSecond, std::function<void()> fn) : |
| 19 | m_delta(std::chrono::milliseconds(1000/callsPerSecond)), |
| 20 | m_callPending(false), |
| 21 | m_fn(fn), |
| 22 | m_executor(executor) |
| 23 | { |
| 24 | } |
| 25 | |
| 26 | void Throttle::operator()() |
| 27 | { |
nothing calls this directly
no outgoing calls
no test coverage detected