From 2e793141e5434043205763c70d3a597cf2d78eeb Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 4 Jan 2025 17:51:59 +0100 Subject: Separate clocks --- InternalClick.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 InternalClick.h (limited to 'InternalClick.h') diff --git a/InternalClick.h b/InternalClick.h new file mode 100644 index 0000000..1fffb6c --- /dev/null +++ b/InternalClick.h @@ -0,0 +1,28 @@ +#pragma once + +#include + +#include "config.h" +#include "BPMDetect.h" + +using clock_type = std::chrono::high_resolution_clock; + +// Internally generated +// Configured via: BPM +class InternalClick +{ +public: + InternalClick(Config& config); + + // signals + boost::signals2::signal signal_click; + + // slots + void run_cyclic_50ms(); + +private: + Config& m_config; + + std::chrono::time_point m_timestamp; +}; + -- cgit v1.2.3