1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 05:40:32 +05:30
yattee/Shared/Delay.swift

8 lines
234 B
Swift
Raw Normal View History

2022-08-25 22:39:55 +05:30
import Foundation
2024-02-02 04:21:41 +05:30
enum Delay {
2022-08-25 22:39:55 +05:30
@discardableResult static func by(_ interval: TimeInterval, block: @escaping () -> Void) -> Timer {
Timer.scheduledTimer(withTimeInterval: interval, repeats: false) { _ in block() }
}
}