Search notes:

System.Diagnostics.Stopwatch (class)

Measure elapsed time.

Powershell example

The following simple PowerShell example tries to demonstrate how System.Diagnostics.Stopwatch can be used to measure elapsed time in milliseconds:
$stopWatch = new-object System.Diagnostics.Stopwatch

$stopWatch.Start()

$null = [System.Windows.Forms.Messagebox]::Show(
    "Press OK when done"    ,
    "Measuring elapsed time",
    [System.Windows.Forms.MessageBoxButtons]::OK
)


write-output("$($stopWatch.ElapsedMilliseconds) milliseconds have elapsed")
Github repository .NET-API, path: /System/Diagnostics/Stopwatch/measure-elapsed-time.ps1

See also

System.TimeSpan

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1759391364, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/dot-net/namespaces-classes/System/Diagnostics/Stopwatch(54): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78