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:
GabyCT 2023-07-13 11:21:09 -06:00 committed by GitHub
commit 8db43eae44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}