diff options
Diffstat (limited to 'src/config.ts')
-rw-r--r-- | src/config.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/config.ts b/src/config.ts new file mode 100644 index 0000000..c20bff2 --- /dev/null +++ b/src/config.ts @@ -0,0 +1,21 @@ +export interface Config { + prepare : number; + tabatas : number; + cycles : number; + work : number; + rest : number; +} + +export function init(): Config { + return { + prepare: 10, + tabatas: 4, + cycles: 8, + work: 20, + rest: 10 + } +} + +export function getDuration(c: Config): number { + return c.tabatas * (c.prepare + (c.cycles * (c.work + c.rest))) +} |