Stopwatch

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche

Create a PowerShell Stopwatch (Measure-Command alternative)

#Create/start the Stopwatch
$stopwatch =  [system.diagnostics.stopwatch]::StartNew() 
 
#Get the time from start to now
$stopwatch
 
#Check is the stopwatch running
$stopwatch.IsRunning
 
#Stop the stopwatch
$stopwatch.stop()