Skip to content

Instantly share code, notes, and snippets.

@abijaK
Last active December 20, 2022 09:49
Show Gist options
  • Save abijaK/ff1f7a2c06e0a9abf960927dba58dafa to your computer and use it in GitHub Desktop.
Save abijaK/ff1f7a2c06e0a9abf960927dba58dafa to your computer and use it in GitHub Desktop.
Passage de la session à la pause courte
// 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