Created
September 7, 2018 14:25
-
-
Save Rudde/73d58d333ad3e21429fbceb59c21d95f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Format-Time() { | |
Param ([int]$ms) | |
If ($ms -gt 3600000) {[string]::Format("{0:0.00} hours", $ms / 3600000)} | |
ElseIf ($ms -gt 60000) {[string]::Format("{0:0.00} minutes", $ms / 60000)} | |
ElseIf ($ms -gt 1000) {[string]::Format("{0:0.00} seconds", $ms / 1000)} | |
ElseIf ($ms -gt 0) {[string]::Format("{0:0.00} milliseconds", $ms)} | |
Else {"0 milliseconds"} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment