summaryrefslogtreecommitdiff
path: root/ot_clean.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_clean.c')
-rw-r--r--ot_clean.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ot_clean.c b/ot_clean.c
index 7ac86a8..4f18433 100644
--- a/ot_clean.c
+++ b/ot_clean.c
@@ -8,6 +8,7 @@
8#include <string.h> 8#include <string.h>
9#include <pthread.h> 9#include <pthread.h>
10#include <sys/uio.h> 10#include <sys/uio.h>
11#include <unistd.h>
11 12
12/* Libowfat */ 13/* Libowfat */
13#include "byte.h" 14#include "byte.h"
@@ -103,6 +104,11 @@ static void clean_make() {
103 } 104 }
104 } 105 }
105 mutex_bucket_unlock( bucket ); 106 mutex_bucket_unlock( bucket );
107
108 /* We want the cleanup to be spread about 2 Minutes to reduce load spikes
109 during cleanup. Sleeping around two minutes was chosen to allow enough
110 time for the actual work and fluctuations in timer. */
111 usleep( ( 2 * 60 * 1000000 ) / OT_BUCKET_COUNT );
106 } 112 }
107} 113}
108 114