Skip to content

Commit

Permalink
fix/#352 로컬알람 10분추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hooni0918 committed Sep 2, 2024
1 parent ebdb48a commit a50ee78
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ final class SetReadyInfoViewModel {
let moveMinute = ObservablePattern<String>("")
let isSucceedToSave = ObservablePattern<Bool>(false)

let bufferTime: TimeInterval = 10 * 60

var readyTime: Int = 0
var moveTime: Int = 0

Expand Down Expand Up @@ -142,8 +144,8 @@ final class SetReadyInfoViewModel {
print("이동 시간: \(self.moveTime)")
print("총 준비 시간: \(totalPrepTime / 60)")

let readyStartTime = promiseDate.addingTimeInterval(-TimeInterval(self.readyTime + self.moveTime) * 60)
let moveStartTime = promiseDate.addingTimeInterval(-TimeInterval(self.moveTime) * 60)
let readyStartTime = promiseDate.addingTimeInterval(-(totalPrepTime + bufferTime))
let moveStartTime = promiseDate.addingTimeInterval(-(TimeInterval(self.moveTime * 60) + bufferTime))

print("준비 시작 시간: \(timeFormatter.string(from: readyStartTime))")
print("이동 시작 시간: \(timeFormatter.string(from: moveStartTime))")
Expand Down

0 comments on commit a50ee78

Please sign in to comment.