From 9511af242e458a373396ba6285fc26a0413cd592 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 24 Jul 2023 09:12:42 +0800 Subject: [PATCH] chore: time unit of os uptime --- source/dnode/mgmt/mgmt_dnode/src/dmWorker.c | 2 +- source/os/src/osSysinfo.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c index a7f58b1cd0..7cc896cb84 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmWorker.c @@ -43,7 +43,7 @@ static void *dmStatusThreadFp(void *param) { } if ((upTimeCount = (++upTimeCount & 63)) == 0) { - upTime = (taosGetOsUptime() - tsDndStartOsUptime) * 1000; + upTime = taosGetOsUptime() - tsDndStartOsUptime; tsDndUpTime = TMAX(tsDndUpTime, upTime); } } diff --git a/source/os/src/osSysinfo.c b/source/os/src/osSysinfo.c index a29b96dd6f..a5b8af3e6e 100644 --- a/source/os/src/osSysinfo.c +++ b/source/os/src/osSysinfo.c @@ -967,7 +967,7 @@ int64_t taosGetOsUptime() { #else struct sysinfo info; if (0 == sysinfo(&info)) { - return info.uptime; + return (int64_t)info.uptime * 1000; }; #endif return 0; -- GitLab