mirror of
https://github.com/openharmony/graphic_utils.git
synced 2026-07-20 00:43:32 -04:00
Description: fix graphic timer nano second compute error
IssueNo: https://gitee.com/openharmony/graphic_utils/issues/I6C8WB Feature or Bugfix: Feature Binary Source:No Signed-off-by: lizhiqi <lizhiqi1@huawei.com>
This commit is contained in:
@@ -244,7 +244,7 @@ bool GraphicTimer::Start()
|
||||
}
|
||||
|
||||
struct itimerspec its;
|
||||
its.it_value.tv_nsec = periodMs_ % NS_PER_MS;
|
||||
its.it_value.tv_nsec = (periodMs_ % MS_PER_SECOND) * NS_PER_MS;
|
||||
its.it_value.tv_sec = periodMs_ / MS_PER_SECOND;
|
||||
if (isPeriodic_) {
|
||||
its.it_interval.tv_nsec = its.it_value.tv_nsec;
|
||||
|
||||
Reference in New Issue
Block a user