mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-02-21 06:24:23 +01:00
Merge pull request #7318 from dborquez/fix_timestamp_generator_on_metrics
metrics: Fix metrics ts generator to treat numbers as decimals
This commit is contained in:
@@ -22,7 +22,7 @@ timestamp_ns() {
|
||||
t="$(date +%-s:%-N)"
|
||||
s=$(echo $t | awk -F ':' '{print $1}')
|
||||
n=$(echo $t | awk -F ':' '{print $2}')
|
||||
ns=$(( (s * 1000000000) + n ))
|
||||
ns=$(echo "$s * 1000000000 + $n" | bc)
|
||||
|
||||
echo $ns
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user