Code example for SecureRandom

Methods: sleepnextLong

0
     * @return computed result 
     * @throws Exception if unable to compute a result 
     */ 
    public String call() throws Exception {
         
        long sleepTime = Math.abs(randomGenerator.nextLong()) % 20000; // Max 20 seconds
        Thread.sleep(sleepTime);
         
        return getTime(); 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java