aboutsummaryrefslogtreecommitdiff
path: root/src/config.ts
diff options
context:
space:
mode:
authorJoris2021-05-15 12:47:04 +0200
committerJoris2021-05-15 12:47:04 +0200
commitd1ce8774ec3291374c222c8f64c085e3a99f6147 (patch)
tree3ed888c65600cfea0d56494ae35940744eba1d14 /src/config.ts
parent6a9f9a9f3cf547da80df973950489e343143289d (diff)
downloadtabata-d1ce8774ec3291374c222c8f64c085e3a99f6147.tar.gz
tabata-d1ce8774ec3291374c222c8f64c085e3a99f6147.tar.bz2
tabata-d1ce8774ec3291374c222c8f64c085e3a99f6147.zip
Add warm up
Diffstat (limited to 'src/config.ts')
-rw-r--r--src/config.ts6
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)))
}