diff options
Diffstat (limited to 'src/time.odin')
-rw-r--r-- | src/time.odin | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/time.odin b/src/time.odin index 080096b..44c810a 100644 --- a/src/time.odin +++ b/src/time.odin @@ -42,6 +42,12 @@ Timeblock :: struct { reason : string, } +Fractionpair :: struct { + start : f32, + end : f32, +} + + Workday :: struct { call : Moment, wrap : Moment, @@ -52,16 +58,14 @@ Workday :: struct { // cause more blocks blocks : [16]Timeblock, - // Fractions store how far - // through the day each - // timesplit occurs. - // They should probably be - // changed to come in pairs, - // as moments do in timeblocks, - // because then we can store - // both the start and end - // of timeblocks in fractions - fractions : [16]f32, + // Fractions store how long + // since the workday's + // preceding midnight + // a timesplit occurs. + // They're pairs so they + // can exactly map to each + // timeblock's start and end + fractions : [16]Fractionpair, total_timeblocks : int, } |