diff options
author | Joris | 2021-05-15 12:47:04 +0200 |
---|---|---|
committer | Joris | 2021-05-15 12:47:04 +0200 |
commit | d1ce8774ec3291374c222c8f64c085e3a99f6147 (patch) | |
tree | 3ed888c65600cfea0d56494ae35940744eba1d14 /src/config.ts | |
parent | 6a9f9a9f3cf547da80df973950489e343143289d (diff) |
Add warm up
Diffstat (limited to 'src/config.ts')
-rw-r--r-- | src/config.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/config.ts b/src/config.ts index c20bff2..d1d369e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,5 @@ export interface Config { + warmup: number; prepare : number; tabatas : number; cycles : number; @@ -8,8 +9,9 @@ export interface Config { export function init(): Config { return { - prepare: 10, + warmup: 120, tabatas: 4, + prepare: 10, cycles: 8, work: 20, rest: 10 @@ -17,5 +19,5 @@ export function init(): Config { } export function getDuration(c: Config): number { - return c.tabatas * (c.prepare + (c.cycles * (c.work + c.rest))) + return c.warmup + c.tabatas * (c.prepare + (c.cycles * (c.work + c.rest))) } |