mirror of
https://gitee.com/openharmony/communication_ipc
synced 2024-12-02 21:28:28 +00:00
修改初始化GetLastRequestTime值
Signed-off-by: yanghang <yanghang86@huawei.com>
This commit is contained in:
parent
f8b915b756
commit
10081a51ca
@ -66,6 +66,9 @@ IPCObjectStub::IPCObjectStub(std::u16string descriptor, bool serialInvokeFlag)
|
||||
ZLOGD(LABEL, "desc:%{public}s, %{public}u",
|
||||
ProcessSkeleton::ConvertToSecureDesc(Str16ToStr8(descriptor_)).c_str(),
|
||||
ProcessSkeleton::ConvertAddr(this));
|
||||
auto start = std::chrono::steady_clock::now();
|
||||
lastRequestTime_ = static_cast<uint64_t>(std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
start.time_since_epoch()).count());
|
||||
InitCodeMap();
|
||||
ProcessSkeleton *current = ProcessSkeleton::GetInstance();
|
||||
if (current == nullptr) {
|
||||
|
@ -170,7 +170,7 @@ HWTEST_F(IPCObjectStubTest, GetLastRequestTimeTest001, TestSize.Level1)
|
||||
sptr<IPCObjectStub> testStub = new IPCObjectStub(u"testStub");
|
||||
|
||||
uint64_t ret = testStub->GetLastRequestTime();
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_TRUE(ret > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user