diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/loop_sleep.c | 2 | ||||
| -rw-r--r-- | tests/timer_loop.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/loop_sleep.c b/tests/loop_sleep.c index 03deb53..3576988 100644 --- a/tests/loop_sleep.c +++ b/tests/loop_sleep.c @@ -3,7 +3,6 @@ #include <nnwt/timer.h> static struct nn_event_loop loop; -static struct nn_timer timer; static void timer_callback2(void *userdata, struct nn_timer *timer) { @@ -34,6 +33,7 @@ s32 main(void) nn_event_loop_init(&loop); + struct nn_timer timer; nn_timer_init(&timer, &loop, timer_callback, NULL); nn_timer_set_repeat(&timer, NNWT_TS_FROM_USEC(1000000)); nn_timer_again(&timer); diff --git a/tests/timer_loop.c b/tests/timer_loop.c index a90f7c0..1df6863 100644 --- a/tests/timer_loop.c +++ b/tests/timer_loop.c @@ -5,9 +5,6 @@ #define DELAY 100000 #define REPEAT 21 -static struct nn_event_loop loop; -static struct nn_timer timer; - static f64 start; static u32 iter = 0u; @@ -27,6 +24,9 @@ s32 main(void) { if (!nn_common_init(NULL)) return EXIT_FAILURE; + struct nn_event_loop loop; + struct nn_timer timer; + nn_event_loop_init(&loop); start = nn_get_tick(); |