pool.poolpos = i;
}
-static void random_timer(void *ctx, long now)
+static void random_timer(void *ctx, unsigned long now)
{
- if (random_active > 0 && now - next_noise_collection >= 0) {
+ if (random_active > 0 && now == next_noise_collection) {
noise_regular();
next_noise_collection =
schedule_timer(NOISE_REGULAR_INTERVAL, random_timer, &pool);
int random_byte(void)
{
+ assert(random_active);
+
if (pool.poolpos >= POOLSIZE)
random_stir();