blob: 3fb04d4b4b80ab4ec5474ae2842e928ce1e96c86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
#include <chrono>
#include <boost/signals2.hpp>
#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<void(std::chrono::duration<double>)> signal_click; // offset in s
// slots
void run_cyclic_50ms();
private:
Config& m_config;
std::chrono::time_point<clock_type> m_timestamp;
};
|