Class Threads


  • public final class Threads
    extends java.lang.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 Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void sleep​(long millis)
      Causes the currently executing thread to sleep for the specified number of milliseconds (max 30,000ms).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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)