[riot-notifications] [RIOT-OS/RIOT] tests/ztimer_periodic: iterate over clocks (#16254)

Francisco notifications at github.com
Tue Jun 1 14:25:59 CEST 2021


@fjmolinas commented on this pull request.



>  
-    ztimer_periodic_init(ZTIMER_MSEC, &t, callback, NULL, INTERVAL);
-    uint32_t last = ztimer_now(ZTIMER_MSEC);
-
-    ztimer_periodic_start(&t);
-
-    if (!ztimer_is_set(ZTIMER_MSEC, &t.timer)) {
-        print_str("Test failed\n");
-        return 1;
-    }
+    for (size_t j = 0; j < ARRAY_SIZE(clocks); j++) {
+        printf("Testing clock: %s\n", _names[j]);
+        ztimer_clock_t *clock = clocks[j];
+        ztimer_periodic_init(clock, &t, callback, clock, _intervals[j]);
+        uint32_t last = ztimer_now(clock);

Re-running the tests

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16254#discussion_r643053851
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210601/a5394031/attachment.htm>


More information about the notifications mailing list