Onelinerhub / onelinerhub

Thousands of code solutions with clear explanation @ onelinerhub.com
https://onelinerhub.com
MIT License
802 stars 159 forks source link

Create measure_time_of_execution.md #1911

Closed ErikThiart closed 1 year ago

ErikThiart commented 1 year ago

This code first sets the $start variable to the current date and time using the Get-Date cmdlet. Then, it runs some other code. After that, it waits for 15 seconds using the Start-Sleep cmdlet (Only for Testing Purposes). Finally, it calculates the time difference between the current date and time and the start time, and assigns it to the $time variable.

nonunicorn commented 1 year ago

https://onelinerhub.com/powershell/measure_time_of_execution