From 8160f84e207771ca9c6caa4d9b15341481e6ef1f Mon Sep 17 00:00:00 2001 From: TinyAtoms Date: Sat, 29 Jun 2019 15:23:38 -0300 Subject: [PATCH] db --- Park_time.cpp | 11 +++++++++++ headers/Park_time.h | 1 + test.db3 | Bin 16384 -> 16384 bytes 3 files changed, 12 insertions(+) diff --git a/Park_time.cpp b/Park_time.cpp index 267e0c0..26f319b 100644 --- a/Park_time.cpp +++ b/Park_time.cpp @@ -42,4 +42,15 @@ std::ostream& operator<<(std::ostream& os, const Park_time & pt){ os << "duration : " << pt.duration << "\n"; os << "- - - - - - - - - - - - - - - - - - - -\n"; return os; +} + +void Park_time::debug() { + auto start_to_epoch = start.time_since_epoch(); + auto start_value = std::chrono::duration_cast(start_to_epoch); + int start_seconds = start_value.count(); + + auto end_to_epoch = end.time_since_epoch(); + auto end_value = std::chrono::duration_cast(start_to_epoch); + int end_seconds = end_value.count(); + std::cout << "<" << start_seconds << "-" << end_seconds << ">" ; } \ No newline at end of file diff --git a/headers/Park_time.h b/headers/Park_time.h index 435234a..a98d9c8 100644 --- a/headers/Park_time.h +++ b/headers/Park_time.h @@ -30,6 +30,7 @@ public: Park_time(int c_id, int s_id); void clock_out(int c_id, int s_id); friend std::ostream& operator<<(std::ostream& os, const Park_time & pt); + void debug(); private: high_resolution_clock::time_point start; diff --git a/test.db3 b/test.db3 index 0a82dfacdea70493bfaafbd8c71fc4de37923a9f..10a2d99dfe155a1442be647bb5adf13bdfde3cb1 100644 GIT binary patch delta 85 zcmV-b0IL6hfB}Gj0gxL3UXdI_0ba3Sqz@7Y4(I?6+Yh!6kq>MSR1Y2w=#wB2fs-!~ r3bUaQM-Bos2a_Nl9~Eg>LR5c!MO$D?UQ$R}U|&LaM@#~<9v|W$LI4?x delta 67 zcmV-J0KETzfB}Gj0gxL3U6C9^0bQ|Rqz@1V4;}yy+Yh!6kq>MSR1Y4LAP|9*FAxl~ Zp%6z7lYAc)1ONa4SCeob9kU)E;vjs15@i4Y