Description:latency count

Match-id-8c8f6d8c16f660408afc7cf0bfe5b5c2f6dbbfbb
This commit is contained in:
xxxx
2022-07-25 09:33:11 +08:00
parent fdab391a02
commit 31036381a1
9 changed files with 190 additions and 13 deletions
+10
View File
@@ -15,6 +15,8 @@
#include "dinput_utils_tool.h"
#include <sys/time.h>
#include "softbus_bus_center.h"
namespace OHOS {
@@ -22,6 +24,7 @@ namespace DistributedHardware {
namespace DistributedInput {
namespace {
const std::string DINPUT_PKG_NAME = "ohos.dhardware.dinput";
constexpr int32_t MS_ONE_SECOND = 1000;
}
DevInfo GetLocalDeviceInfo()
@@ -40,6 +43,13 @@ DevInfo GetLocalDeviceInfo()
return devInfo;
}
uint64_t GetCurrentTime()
{
struct timeval tv;
gettimeofday(&tv, nullptr);
return tv.tv_sec * MS_ONE_SECOND + tv.tv_usec / MS_ONE_SECOND;
}
}
}
}