PowerShell: Stopwatch

$Stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
# Do stuff
$Stopwatch.Stop()

$TotalSecs =  [math]::Round($stopwatch.Elapsed.TotalSeconds,0)
write-host $TotalSecs

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *