Last active
December 20, 2022 09:49
-
-
Save abijaK/ff1f7a2c06e0a9abf960927dba58dafa to your computer and use it in GitHub Desktop.
Passage de la session à la pause courte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if seconds get value 0 then decrement minutes (onWorking) | |
if (decrementSec === 0) { | |
onWorking -= 1; | |
// commute between session time and break time | |
if (onWorking === -1) { | |
if (isSwitching % 2 === 0) { | |
// Start with breack timer | |
onWorking = initial.breakTime; | |
isSwitching+=1 | |
} else{ | |
// Continue working | |
onBreaking = initial.startTime; //25 | |
isSwitching = 0; | |
} | |
} | |
decrementSec = 59; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment