1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <assert.h> #include <stdlib.h> #include "sig.h" static float ops_rand_output(void *context, unsigned ticks_ms) { return rand_r(&ticks_ms) * 1.f / (float)RAND_MAX; } sig_ops_t sig_ops_rand = { .output = ops_rand_output, };