mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/thread_flags: add call to set_timeout_flag64
This commit is contained in:
parent
58e381979f
commit
0bcef73067
@ -98,6 +98,14 @@ int main(void)
|
||||
uint32_t diff = xtimer_now_usec() - before;
|
||||
printf("main: timeout triggered. time passed: %"PRIu32"us\n", diff);
|
||||
|
||||
puts("main: setting 100ms timeout (using uint64)...");
|
||||
uint64_t timeout64 = TIMEOUT;
|
||||
before = xtimer_now_usec();
|
||||
xtimer_set_timeout_flag64(&t, timeout64);
|
||||
thread_flags_wait_any(THREAD_FLAG_TIMEOUT);
|
||||
diff = xtimer_now_usec() - before;
|
||||
printf("main: timeout triggered. time passed: %"PRIu32"us\n", diff);
|
||||
|
||||
if (diff < (TIMEOUT + THRESHOLD)) {
|
||||
puts("SUCCESS");
|
||||
return 0;
|
||||
|
@ -24,6 +24,8 @@ def testfunc(child):
|
||||
child.expect_exact("thread(): received flags: 0x0008")
|
||||
child.expect_exact("main: setting 100ms timeout...")
|
||||
child.expect("main: timeout triggered. time passed: [0-9]{6}us")
|
||||
child.expect_exact("main: setting 100ms timeout (using uint64)...")
|
||||
child.expect("main: timeout triggered. time passed: [0-9]{6}us")
|
||||
child.expect("SUCCESS")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user