mirror of
https://github.com/yattee/yattee.git
synced 2024-12-12 21:30:32 +05:30
8 lines
234 B
Swift
8 lines
234 B
Swift
import Foundation
|
|
|
|
enum Delay {
|
|
@discardableResult static func by(_ interval: TimeInterval, block: @escaping () -> Void) -> Timer {
|
|
Timer.scheduledTimer(withTimeInterval: interval, repeats: false) { _ in block() }
|
|
}
|
|
}
|