Search notes:
PowerShell cmdLet measure-command
Unsurprisingly, it takes 3 seconds to sleep for 3 seconds:
measure-command { start-sleep 3 }
Days : 0
Hours : 0
Minutes : 0
Seconds : 3
Milliseconds : 1
Ticks : 30013870
TotalDays : 3.4738275462963E-05
TotalHours : 0.000833718611111111
TotalMinutes : 0.0500231166666667
TotalSeconds : 3.001387
TotalMilliseconds : 3001.387
Of course, if I am only interested in the (rounded) number of seconds, I can
pipe the result through
select-object
:
measure-command { start-sleep 3 } | select-object seconds
Seconds
-------
3
Measure the time of any command or pipeline
measure-command {
1 .. 1mb |
get-random
}
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/Windows/...', 1743262809, '13.59.90.174', 'Mozilla/5.0 App...', NULL)
#2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/command-inventory/noun/command/measure/index(70): insert_webrequest()
#3 {main}
thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78