use System#currentTimeMillis instead of new Date().getTime() (#1975)

This commit is contained in:
XenoAmess 2021-10-19 10:25:16 +08:00 committed by GitHub
parent 72b1c7401e
commit 172f4397b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,7 +208,7 @@ public class DashboardCommand extends AnnotatedCommand {
runtimeInfo.setSystemLoadAverage(ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage());
runtimeInfo.setProcessors(Runtime.getRuntime().availableProcessors());
runtimeInfo.setUptime(ManagementFactory.getRuntimeMXBean().getUptime() / 1000);
runtimeInfo.setTimestamp(new Date().getTime());
runtimeInfo.setTimestamp(System.currentTimeMillis());
dashboardModel.setRuntimeInfo(runtimeInfo);
}