summaryrefslogtreecommitdiff
path: root/daemon/src/Sinewave.h
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/src/Sinewave.h')
-rw-r--r--daemon/src/Sinewave.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/daemon/src/Sinewave.h b/daemon/src/Sinewave.h
index d8988ad..d5be732 100644
--- a/daemon/src/Sinewave.h
+++ b/daemon/src/Sinewave.h
@@ -1,12 +1,13 @@
#pragma once
-#include <string>
-#include <math.h>
+#include <cmath>
#include <chrono>
#include "Assembly.h"
-class Sinewave {
+class Sinewave
+{
+ using clock = std::chrono::high_resolution_clock;
public:
Sinewave();
@@ -21,13 +22,12 @@ public:
double get_frequency() const;
double get_phase() const;
+ double get_point() const;
+
private:
- std::chrono::time_point<std::chrono::high_resolution_clock> m_start_time, m_current_time;
- std::chrono::duration<double> m_duration_time;
+ const std::chrono::high_resolution_clock::time_point m_start_time;
double m_amplitude;
double m_frequency;
double m_phase;
-
- double get_point();
};