1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 06:40:32 +05:30
yattee/Shared/Delay.swift
Arkadiusz Fal 39a109216b Style fix
2024-02-02 11:06:32 +01:00

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() }
}
}