mirror of
https://github.com/yattee/yattee.git
synced 2024-11-14 01:58:24 +00:00
8 lines
236 B
Swift
8 lines
236 B
Swift
|
import Foundation
|
||
|
|
||
|
struct Delay {
|
||
|
@discardableResult static func by(_ interval: TimeInterval, block: @escaping () -> Void) -> Timer {
|
||
|
Timer.scheduledTimer(withTimeInterval: interval, repeats: false) { _ in block() }
|
||
|
}
|
||
|
}
|