🐶【Swift】最もシンプルに実行時間を計測する2024/06/22に公開Swiftプログラミング入門techlet start = Date() try? await Task.sleep(for: .milliseconds(1234)) let end = -start.timeIntervalSinceNow print(String(format: "%.3f", end)) // 1.246 🙆🏻♂️ 引用 https://android.benigumo.com/20240622/mesure-execution-time/ https://android.benigumo.com/20240521/common-string-format/ Discussion
Discussion