Skip to content

Commit

Permalink
util: fix ble/util/clock in bash-4.2 [main: fix the timestamp in the …
Browse files Browse the repository at this point in the history
…session ID in bash-4.2]
  • Loading branch information
akinomyoga committed Feb 19, 2023
1 parent 78bbc5e commit 9a24b1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.sh
Expand Up @@ -2543,11 +2543,11 @@ function ble/util/clock/.initialize {
((ret=integral*1000+10#0$fraction))
}
elif ((_ble_bash>=40200)); then
printf -v _ble_util_clock_base '%(%s)T'
printf -v _ble_util_clock_base '%(%s)T' -1
_ble_util_clock_reso=1000
_ble_util_clock_type=printf
function ble/util/clock {
local now; printf -v now '%(%s)T'
local now; printf -v now '%(%s)T' -1
((ret=(now-_ble_util_clock_base)*1000))
}
elif [[ $SECONDS && ! ${SECONDS//[0-9]} ]]; then
Expand Down

0 comments on commit 9a24b1e

Please sign in to comment.