aboutsummaryrefslogtreecommitdiff
path: root/src/time.h
diff options
context:
space:
mode:
authorSanJacobs2022-04-19 00:21:04 +0200
committerSanJacobs2022-04-19 00:21:04 +0200
commit89ffc2637b6b8e33f55728e0132d62749c53ec1d (patch)
tree492d6602da604ce599a8941efa63557c112fe0c7 /src/time.h
parent181442ab4256f3c12ef0a62ed44e6e9fd0f58095 (diff)
downloadsatscalc-89ffc2637b6b8e33f55728e0132d62749c53ec1d.tar.gz
satscalc-89ffc2637b6b8e33f55728e0132d62749c53ec1d.tar.bz2
satscalc-89ffc2637b6b8e33f55728e0132d62749c53ec1d.zip
Tested and bugfixed delta-generation
I also added a beautiful operator<< overloading for deltas, I think it is very pretty.
Diffstat (limited to 'src/time.h')
-rwxr-xr-xsrc/time.h22
1 files changed, 12 insertions, 10 deletions
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 <vector>
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) {