Floor random number

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-08-17 13:46:37 +02:00
parent 4f685aac96
commit d155fedfc4
+1 -1
View File
@@ -29,6 +29,6 @@ export function createRandomRefreshInterval(options: {
}): RefreshIntervalFunction {
const { minSeconds, maxSeconds } = options;
return () => {
return Math.random() * (maxSeconds - minSeconds) + minSeconds;
return Math.floor(Math.random() * (maxSeconds - minSeconds) + minSeconds);
};
}