diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-10 10:37:30 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-10 10:42:05 +0200 |
commit | 9618b30b4e447a767e618d93dbb08c6dd54ef4c7 (patch) | |
tree | 42ebbb3104190c3e2e971645e5fe3956ca2fb096 /opentrack-logic/tracklogger.cpp | |
parent | 9ca25ef8d49098bba3ab821ea84ef51843a74933 (diff) |
logic/track-logger: simplify to output dt
Diffstat (limited to 'opentrack-logic/tracklogger.cpp')
-rw-r--r-- | opentrack-logic/tracklogger.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/opentrack-logic/tracklogger.cpp b/opentrack-logic/tracklogger.cpp index c644df16..64dda579 100644 --- a/opentrack-logic/tracklogger.cpp +++ b/opentrack-logic/tracklogger.cpp @@ -3,6 +3,17 @@ TrackLogger::~TrackLogger() {} +void TrackLogger::reset_dt() +{ + t.start(); +} + +void TrackLogger::write_dt() +{ + const double dt = t.elapsed_seconds(); + write(&dt, 1); +} + void TrackLoggerCSV::handle_first_col_sep() { if (!first_col) @@ -32,4 +43,5 @@ void TrackLoggerCSV::next_line() { out << std::endl; first_col = true; -}
\ No newline at end of file +} + |