Fix simple mistake

This commit is contained in:
HansHoogerwerf 2022-10-17 16:24:59 +02:00 committed by GitHub
parent 98ac5a562a
commit ff26dca83a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -2562,17 +2562,19 @@
GetTimestamp() {
ts=0
# Detect if the implementation of date supports nanoseconds,
if [ "${OS}" = "Linux" ]; then
current_nanoseconds=$(date "+%N")
# Verify if the result of the command is a number
# Detect if the implementation of date supports nanoseconds,
if [ "${OS}" = "Linux" ]; then
current_nanoseconds=$(date "+%N")
# Verify if the result of the command is a number
if [ -n "$current_nanoseconds" ] && [ "$current_nanoseconds" -eq "$current_nanoseconds" ] 2>/dev/null; then
ts=$(date "+%s%N")
else
ts=$(date "+%s")
fi
ts=$(date "+%s")
fi
else
ts=$(date "+%s")
fi
echo $ts
echo $ts
}
Register() {