Skip to content

Commit

Permalink
Fix incorrect time estimation #5
Browse files Browse the repository at this point in the history
  • Loading branch information
mwood77 committed Feb 12, 2023
1 parent 5e6e527 commit 5ffe6e0
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,15 @@ export class SettingsComponent implements OnInit {

const finalRoutineDuration = totalRestDuration + totalSecondsSpentTurning;

console.log(finalRoutineDuration);

const readableDuration = new Date(0,0);
readableDuration.setSeconds(finalRoutineDuration);
readableDuration.setMinutes(finalRoutineDuration / 60);
console.log(readableDuration);

// readableDuration.setMinutes(finalRoutineDuration / 60);
console.log(readableDuration);

console.log(finalRoutineDuration);

const hours = readableDuration.toTimeString().slice(0,2);
const mins = readableDuration.toTimeString().slice(3,5);
Expand Down

0 comments on commit 5ffe6e0

Please sign in to comment.