This commit is contained in:
TinyAtoms 2019-06-29 15:23:38 -03:00
parent 85ba50c5d6
commit 8160f84e20
3 changed files with 12 additions and 0 deletions

View File

@ -43,3 +43,14 @@ std::ostream& operator<<(std::ostream& os, const Park_time & pt){
os << "- - - - - - - - - - - - - - - - - - - -\n"; os << "- - - - - - - - - - - - - - - - - - - -\n";
return os; return os;
} }
void Park_time::debug() {
auto start_to_epoch = start.time_since_epoch();
auto start_value = std::chrono::duration_cast<std::chrono::seconds>(start_to_epoch);
int start_seconds = start_value.count();
auto end_to_epoch = end.time_since_epoch();
auto end_value = std::chrono::duration_cast<std::chrono::seconds>(start_to_epoch);
int end_seconds = end_value.count();
std::cout << "<" << start_seconds << "-" << end_seconds << ">" ;
}

View File

@ -30,6 +30,7 @@ public:
Park_time(int c_id, int s_id); Park_time(int c_id, int s_id);
void clock_out(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); friend std::ostream& operator<<(std::ostream& os, const Park_time & pt);
void debug();
private: private:
high_resolution_clock::time_point start; high_resolution_clock::time_point start;

BIN
test.db3

Binary file not shown.