diff --git a/src/main/kotlin/service/AutoTradingManager.kt b/src/main/kotlin/service/AutoTradingManager.kt index 36336e4..b6c20e0 100644 --- a/src/main/kotlin/service/AutoTradingManager.kt +++ b/src/main/kotlin/service/AutoTradingManager.kt @@ -79,6 +79,7 @@ object AutoTradingManager { var webSocketConnect by mutableStateOf(false) var testFlag = false + fun startBackgroundScheduler() { scope.launch { while (isActive) { @@ -86,6 +87,8 @@ object AutoTradingManager { if (now.isAfter(H08M30) && now.isBefore(H18) && !shouldShowFullWindow) { shouldShowFullWindow = true SystemSleepPreventer.wakeDisplay() + } else if (now.isAfter(LocalTime.of(23, 50)) && now.isBefore(LocalTime.of(8, 0))) { + SystemSleepPreventer.sleepDisplay() } delay(60_000 * 3) // 1분마다 체크 }