mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-21 05:45:23 -04:00
Description:latency count
Match-id-8c8f6d8c16f660408afc7cf0bfe5b5c2f6dbbfbb
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user