From 89ffc2637b6b8e33f55728e0132d62749c53ec1d Mon Sep 17 00:00:00 2001 From: SanJacobs Date: Tue, 19 Apr 2022 00:21:04 +0200 Subject: Tested and bugfixed delta-generation I also added a beautiful operator<< overloading for deltas, I think it is very pretty. --- src/time.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/time.h') diff --git a/src/time.h b/src/time.h index b512e91..9e793ec 100755 --- a/src/time.h +++ b/src/time.h @@ -7,10 +7,11 @@ #include struct delta{ - signed int minutes; - signed int hours; - signed int days; + unsigned int minutes; + unsigned int hours; + unsigned int days; }; +std::ostream& operator<<(std::ostream& stream, const delta& other); struct moment{ signed int minutes; @@ -39,16 +40,17 @@ struct workday{ timeblock blocks[12]; // // 1. sleepbreach - // 2. Call - // 3. Early morning + // 2. call + // 3. early morning // 4. start of day // 5. 1st hr overtime // 6. post-1 hour overtime - // 7. 14-hour mark - // 8. 22:00 - // 9. midnight crossing - // 10. 06:00 - // 11. wrap + // 7. end of warned ot + // 8. 14-hour mark + // 9. 22:00 + // 10. midnight crossing + // 11. 06:00 + // 12. wrap // workday(moment calltime, moment wraptime, moment planned_wraptime) { -- cgit v1.2.1