@@ -65,23 +65,23 @@ class DigmathonService : Disposable {
6565 init {
6666
6767 // for development,simulate a 5 minutes event that starts 2 minutes after IDE start and lasts for 5 minutes
68- // val simulateStart = System.getProperty("org.digma.digmathon.simulate.startAfterMinutes")
69- // val simulatePeriod = System.getProperty("org.digma.digmathon.simulate.periodMinutes")
70- //
71- // if (simulateStart != null) {
72- // val startAfter = simulateStart.toLong()
73- // val endAfter = (simulatePeriod.toLongOrNull() ?: 10) + startAfter
74- //
75- // digmathonInfo.set(
76- // DigmathonInfo(
77- // LocalDateTime.now().plusMinutes(startAfter).atZone(ZoneId.systemDefault()),
78- // LocalDateTime.now().plusMinutes(endAfter).atZone(ZoneId.systemDefault())
79- // )
80- // )
81- // DigmathonProductKey().clear()
82- // isDigmathonActive.set(digmathonInfo.get().isActive())
83- // isUserFinishedDigmathon = false
84- // }
68+ val simulateStart = System .getProperty(" org.digma.digmathon.simulate.startAfterMinutes" )
69+ val simulatePeriod = System .getProperty(" org.digma.digmathon.simulate.periodMinutes" )
70+
71+ if (simulateStart != null ) {
72+ val startAfter = simulateStart.toLong()
73+ val endAfter = (simulatePeriod.toLongOrNull() ? : 10 ) + startAfter
74+
75+ digmathonInfo.set(
76+ DigmathonInfo (
77+ LocalDateTime .now().plusMinutes(startAfter).atZone(ZoneId .systemDefault()),
78+ LocalDateTime .now().plusMinutes(endAfter).atZone(ZoneId .systemDefault())
79+ )
80+ )
81+ DigmathonProductKey ().clear()
82+ isDigmathonActive.set(digmathonInfo.get().isActive())
83+ isUserFinishedDigmathon = false
84+ }
8585
8686
8787 if (isDigmathonActive.get() && digmathonInfo.get().isEnded()) {
0 commit comments