Class Threads


  • public final class Threads
    extends Object

    Provides Thread functions.

    Examples

    Please find the thread functions examples below.

    Thread Sleep Example

    This Groovy example shows how to sleep the thread for 200ms.

     import com.avoka.tm.util.Threads
    
     // perform web service request
     ...
    
     // sleep 200ms
     Threads.sleep(200)
    
     // continue
     ... 
    Since:
    5.0.1
    • Method Detail

      • sleep

        public static void sleep​(long millis)
        Causes the currently executing thread to sleep for the specified number of milliseconds (max 30,000ms).
        Parameters:
        millis - the length of time to sleep in milliseconds (between 0 and 30,000).
        See Also:
        Thread.sleep(long)