Measure elapsed time in Swift
Update With Swift 5.7, I think everything below becomes obsolete. Swift 5.7 introduces the concept of a Clock which appears to have a function designed to do exactly what is required here. I’ll update with an example as soon as I’ve got Swift 5.7 and have the time to rework it. Here’s a Swift function … Read more