File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
OneSignalSDK/onesignal/src/main/java/com/onesignal Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ open class OSDelayTaskController(private val logger: OSLogger) {
15
15
scheduledThreadPoolExecutor = ScheduledThreadPoolExecutor (1 , JobThreadFactory ())
16
16
}
17
17
18
- protected open fun getRandomNumber (): Int {
18
+ protected open fun getRandomDelay (): Int {
19
19
return (Math .random() * (maxDelay - minDelay + 1 ) + minDelay).roundToInt()
20
20
}
21
21
22
22
open fun delayTaskByRandom (runnable : Runnable ) {
23
- val randomNum = getRandomNumber ()
23
+ val randomNum = getRandomDelay ()
24
24
25
25
logger.debug(" OSDelayTaskController delaying task $randomNum second from thread: ${Thread .currentThread()} " )
26
26
scheduledThreadPoolExecutor.schedule(runnable, randomNum.toLong(), TimeUnit .SECONDS )
You can’t perform that action at this time.
0 commit comments