Class UTTimerImpl

  • All Implemented Interfaces:
    UTTimer

    public class UTTimerImpl
    extends java.lang.Object
    implements UTTimer
    • Field Detail

      • timer

        private Timer timer
      • destroyed

        private boolean destroyed
    • Constructor Detail

      • UTTimerImpl

        public UTTimerImpl​(java.lang.String name,
                           boolean lightweight)
      • UTTimerImpl

        protected UTTimerImpl​(PluginInterface pi,
                              java.lang.String name,
                              boolean lightweight)
      • UTTimerImpl

        protected UTTimerImpl​(PluginInterface pi,
                              java.lang.String name,
                              int priority)
      • UTTimerImpl

        protected UTTimerImpl​(PluginInterface pi,
                              java.lang.String name,
                              int max_threads,
                              int priority)
    • Method Detail

      • addEvent

        public UTTimerEvent addEvent​(long when,
                                     UTTimerEventPerformer ext_performer)
        Description copied from interface: UTTimer
        Create a single-shot event with delay
        Specified by:
        addEvent in interface UTTimer
        Parameters:
        when - when it is to occur (absolute time, not relative)
        Returns:
      • addPeriodicEvent

        public UTTimerEvent addPeriodicEvent​(long periodic_millis,
                                             UTTimerEventPerformer ext_performer)
        Description copied from interface: UTTimer
        Create a periodic event that will fire every specified number of milliseconds until cancelled or the timer is destroyed
        Specified by:
        addPeriodicEvent in interface UTTimer
        Returns:
      • getMaxThreads

        public int getMaxThreads()
        Description copied from interface: UTTimer
        Releases resources associated with this timer and renders it unusable
        Specified by:
        getMaxThreads in interface UTTimer
      • destroy

        public void destroy()
        Specified by:
        destroy in interface UTTimer