mirror of
https://github.com/rwxrob/dot
synced 2024-11-16 21:25:29 +00:00
11 lines
254 B
Plaintext
11 lines
254 B
Plaintext
|
|
sec2hr () {
|
|
local sec="$1"
|
|
local hours=$(( "${sec}" / 3600 ))
|
|
local remainder=$(( "${sec}" % 3600))
|
|
local minutes=$(( "${remainder}" / 60 ))
|
|
local seconds=$(( "${sec}" % 60))
|
|
printf "%02d:%02d:%02d\n" "${hours}" "${minutes}" "${seconds}"
|
|
}
|
|
|