If you're looking to see how long a piece of your #Swift code takes to execute (and you can’t/don't want to bother with Instruments) look at ContinuousClock.
It can be used like this:
let clock = ContinuousClock()
let elapsed = clock.measure {
<the code to evaluate…>
}
print(“That took: \(elapsed))
Handy for caveman optimizations.
Docs are limited but here:
https://developer.apple.com/documentation/swift/continuousclock/
