Signed-off-by: Teacher_Dong <dongwang.wangdong@huawei.com>

Signed-off-by: Teacher_Dong <dongwang.wangdong@huawei.com>
This commit is contained in:
Teacher_Dong 2024-01-12 02:12:17 +00:00 committed by Gitee
parent 144699660f
commit 7484b17f81
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -32,8 +32,10 @@ static double TimeDiff(struct timeval *x , struct timeval *y)
return 0;
}
double xUs = reinterpret_cast<double>(x->tv_sec * SleepTest::ID_MS_TO_NS_LEVEL) + reinterpret_cast<double>(x->tv_usec);
double yUs = reinterpret_cast<double>(y->tv_sec * SleepTest::ID_MS_TO_NS_LEVEL) + reinterpret_cast<double>(y->tv_usec);
double xUs = reinterpret_cast<double>(x->tv_sec * SleepTest::ID_MS_TO_NS_LEVEL) +
reinterpret_cast<double>(x->tv_usec);
double yUs = reinterpret_cast<double>(y->tv_sec * SleepTest::ID_MS_TO_NS_LEVEL) +
reinterpret_cast<double>(y->tv_usec);
return (yUs - xUs);
}