xtool.git
Publicgit clone https://git.maproj.org/xtool.gitxtool.git / Sources / XKit / Utilities / Task+Utils.swift
Task+Utils.swift5 lines · 170 BRaw
| 1 | extension Task<Never, Never> { |
| 2 | public static func sleep(seconds: Double) async throws { |
| 3 | try await sleep(nanoseconds: UInt64(seconds * 1_000_000_000)) |
| 4 | } |
| 5 | } |