After the 1st, 2nd or 3rd focus block
- Input
- completedFocus = 1, 2 ou 3 (intervalo 4)
- Expected output
- próxima fase: pausa curta (5 min)
None of these three values is a multiple of 4, so the next phase is always the classic cycle short break.
Pomodoro technique
The Pomodoro technique, created by Francesco Cirillo in the late 1980s, splits work into short focus blocks interleaved with breaks, using a tomato-shaped kitchen timer as the original reference that gave the method its name.
None of these three values is a multiple of 4, so the next phase is always the classic cycle short break.
4 is a multiple of the classic cycle interval, so this is the one repetition out of four that unlocks the long break.
The long preset unlocks the long break every 3 blocks instead of 4, so the same block count wraps the cycle sooner.
It's a time-management method that alternates periods of intense focus (usually 25 minutes) with short breaks. Every four focus blocks, you take a longer break. Each block is a “pomodoro”, named after the tomato-shaped kitchen timer used by Francesco Cirillo, who created the technique in the late 1980s.
The classic focus block lasts 25 minutes, followed by a 5-minute break; every 4 finished focus blocks, the break that follows is extended to 15 minutes instead of 5.
Browsers throttle setInterval frequency in inactive tabs to save battery, which would delay a naive counter that decrements "one second per tick". A deadline-based timer avoids this: it recalculates the remaining time by comparing the current clock against the already-set end time, so it does not accumulate drift even with missed ticks.
It depends on the preset: every 4 focus blocks in the classic (25 min) and short (15 min) cycles, and every 3 blocks in the long cycle (50 min). This count is configurable within each of the three presets.
No. Only a focus block that reaches zero adds to the counter that decides whether the next break is short or long; manually stopping before the end does not advance that count.
The timer runs entirely in your browser, with no login and no data sent to any server.