I have a timer that runs to restart an alarm once it goes off.
alarm = NSTimer.scheduledTimerWithTimeInterval( 60 * minutesConstant + secondsConstant,
You just have to add your timer to the main runloop as follow:
Swift 4.2
RunLoop.main.add(timer, forMode: .common)
Swift 3
RunLoop.main.add(alarm, forMode: .commonModes)
Swift 2.x
NSRunLoop.mainRunLoop().addTimer(alarm, forMode: NSRunLoopCommonModes)