Files
utun2/tests/simple_uasync.c
T

28 lines
695 B
C

// 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;
}