-void random_init(void) {
- memset(&pool, 0, sizeof(pool)); /* just to start with */
+static void random_timer(void *ctx, unsigned long now)
+{
+ if (random_active > 0 && now == next_noise_collection) {
+ noise_regular();
+ next_noise_collection =
+ schedule_timer(NOISE_REGULAR_INTERVAL, random_timer, &pool);
+ }
+}
+
+void random_ref(void)
+{
+ if (!random_active) {
+ memset(&pool, 0, sizeof(pool)); /* just to start with */