bunch of work on the interfaces

This commit is contained in:
2025-05-28 14:02:09 +02:00
parent f14474ebb7
commit 38425792b1
6 changed files with 165 additions and 19 deletions

View File

@@ -64,3 +64,9 @@ void nn_busySleep(double t) {
double deadline = nn_realTime() + t;
while(nn_realTime() < deadline) {}
}
void nn_randomLatency(double min, double max) {
double t = (double)rand() / RAND_MAX;
double latency = min + t * (max - min);
nn_busySleep(latency);
}