aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/game/game.utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/game/game.utils.ts')
-rw-r--r--src/app/game/game.utils.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app/game/game.utils.ts b/src/app/game/game.utils.ts
index 6177d2c..4c99c55 100644
--- a/src/app/game/game.utils.ts
+++ b/src/app/game/game.utils.ts
@@ -42,6 +42,10 @@ export function parseLrcLines(lrcText: string): GameLine[] {
return result;
}
+export function calculateCPSNeeded(text: string, seconds: number): number {
+ return text.length / seconds;
+}
+
export function formatTime(ms: number): string {
const s = Math.max(0, Math.floor(ms / 1000));
return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage