[+] Start alarm detector on app start

This commit is contained in:
Hykilpikonna
2021-01-17 10:33:29 -05:00
parent 30756d32aa
commit 879689a10a
2 changed files with 16 additions and 14 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ import Foundation
class AlarmActivator
{
/// Interval in seconds
static var interval = 1
static var interval = 1.0
/// Timer for scheduled calls
var timer: Timer?
@@ -24,7 +24,7 @@ class AlarmActivator
func start()
{
if timer != nil { return }
timer = Timer.scheduledTimer(timeInterval: 5, target: self, selector: #selector(AlarmActivator.check), userInfo: nil, repeats: true)
timer = Timer.scheduledTimer(timeInterval: AlarmActivator.interval, target: self, selector: #selector(AlarmActivator.check), userInfo: nil, repeats: true)
}
/**