aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/phenax/utils
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/kotlin/phenax/utils/program.kt9
1 files changed, 9 insertions, 0 deletions
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