PowerShell Timespans are great for quickly displaying durations, as in:
$starttime = $(get-date)
{ do some processing here }
write-host "Duration: $((new-timespan $starttime $(get-date)).tostring())"
But if I did $loopcount
iterations of processing during that timeframe, how do I divide the duration by $loopcount
to get the average duration per iteration?