Hi @Ed7 ,
you are actually using one of the recommended methods, maybe you are having some deltas in the data, hence the differences between the actual and measured execution time. Still there are two other way to check if the measurement you do is correct, Adma the Automator lists those here:
3 ways to measure your Powershell script's speed
https://www.pluralsight.com/blog/tutorials/measure-powershell-scripts-speed
I hope I could help ypou out. Regards,
----------
If my reply was helpful please don't forget to upvote and/or accept as answer, thank you!
Regards,
Stoyan