feat: background resolution is now automatic and more accurate

This commit is contained in:
David Ralph
2021-07-12 21:48:08 +01:00
parent 99ffc82de0
commit c07d7ecbb0
4 changed files with 21 additions and 13 deletions

View File

@@ -22,9 +22,7 @@ export default class Clock extends React.PureComponent {
this.timer = setTimeout(() => {
const now = new Date();
const timeType = localStorage.getItem('timeType');
switch (timeType) {
switch (localStorage.getItem('timeType')) {
case 'percentageComplete':
this.setState({
time: (now.getHours() / 24).toFixed(2).replace('0.', '') + '%'