Package lejos.utility

Class Delay


  • public class Delay
    extends java.lang.Object
    Simple collection of time delay routines that are non interruptable.
    Author:
    andy
    • Constructor Summary

      Constructors 
      Constructor Description
      Delay()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void msDelay​(long period)
      Wait for the specified number of milliseconds.
      static void nsDelay​(long period)
      Wait for the specified number of nanoseconds.
      static void usDelay​(long period)
      Wait for the specified number of microseconds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Delay

        public Delay()
    • Method Detail

      • msDelay

        public static void msDelay​(long period)
        Wait for the specified number of milliseconds. Delays the current thread for the specified period of time. Can not be interrupted (but it does preserve the interrupted state).
        Parameters:
        period - time to wait in ms
      • usDelay

        public static void usDelay​(long period)
        Wait for the specified number of microseconds. Delays the current thread for the specified period of time. Can not be interrupted.
        Parameters:
        period - time to wait in us
      • nsDelay

        public static void nsDelay​(long period)
        Wait for the specified number of nanoseconds. Delays the current thread for the specified period of time. Can not be interrupted.
        Parameters:
        period - time to wait in ns