You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
695 B
28 lines
695 B
// simple_uasync.c - Minimal uasync implementation for tests |
|
#include "simple_uasync.h" |
|
#include "../lib/u_async.h" |
|
#include <stdlib.h> |
|
#include <string.h> |
|
#include <stdint.h> |
|
#include <limits.h> |
|
|
|
// Global state |
|
static uint32_t current_time = 0; |
|
|
|
// Test helper: advance time and process expired timers |
|
void simple_uasync_advance_time(uint32_t delta_tb) { |
|
current_time += delta_tb; |
|
|
|
// In the real implementation, this would process expired timers |
|
// For now, we just advance the time |
|
} |
|
|
|
// Test helper: get current time |
|
uint32_t simple_uasync_get_time(void) { |
|
return current_time; |
|
} |
|
|
|
// Test helper: clear all timers |
|
void simple_uasync_clear(void) { |
|
current_time = 0; |
|
} |