From fecebfd39809f862e098805219b15c50588bb81a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 30 Aug 2026 22:41:25 +0530 Subject: Development setup + toggling recording --- src/main/kotlin/phenax/utils/program.kt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/main/kotlin/phenax/utils/program.kt (limited to 'src/main/kotlin/phenax/utils/program.kt') diff --git a/src/main/kotlin/phenax/utils/program.kt b/src/main/kotlin/phenax/utils/program.kt new file mode 100644 index 0000000..2d3e04b --- /dev/null +++ b/src/main/kotlin/phenax/utils/program.kt @@ -0,0 +1,9 @@ +package phenax.utils + +fun recordDuration(durationSeconds: Int) { + System.setProperty("phenax.record.frameCount", (60 * durationSeconds).toString()) +} + +fun recordDuration(): Int? = System.getProperty("phenax.record.frameCount")?.toIntOrNull() + +fun recordingEnabled(): Boolean = System.getenv("RECORD") != null -- cgit v1.3.1