Stopwatch: Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „== Create a PowerShell Stopwatch (Measure-Command alternative) == <source lang="powershell"> #Create/start the Stopwatch $stopwatch = [system.diagnostics.stop…“)
 
(kein Unterschied)

Aktuelle Version vom 25. Mai 2020, 13:37 Uhr

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()