Function: runClock()
runClock(
rules,clock,minutes,ctx):object
Defined in: deco/air-breaks.ts:238
Run the clock for minutes at a constant depth. A break starts only when the clock is full and time remains; a break may be left unfinished (clock.breakLeft > 0). noBreakGas: a break was due but no break gas exists, so the diver stayed on the normal gas.
Parameters
rules
ResolvedAirBreaks | undefined
clock
minutes
number
ctx
Returns
object
clock
clock:
BreakClock
noBreakGas
noBreakGas:
boolean
pieces
pieces:
BreakPiece[]
Example
ts
runClock(rules, CLOCK_START, 30, ctx).pieces.length // 3 (20 on, 5 break, 5 on)