Skip to content
Commit 01367597 authored by Hake Huang's avatar Hake Huang Committed by Johan Hedberg
Browse files

test: posix: common: nanosleep test fix



in test_nanosleep_execution, the

actual_ns = k_cyc_to_ns_ceil64((now - then * selection));

is wrong, according to posix driver code

lib/posix/clock.c

line: 156
	if ((flags & TIMER_ABSTIME) == 0) {
		ns += uptime_ns;
	}

so we need change to

actual_ns = k_cyc_to_ns_ceil64((now + then * selection));

fixing: #62889

Co-authored-by: default avatarChristopher Friedt <cfriedt@meta.com>
Signed-off-by: default avatarHake Huang <hake.huang@oss.nxp.com>
parent 5fcae0c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment