Class NSTimer

    • Constructor Detail

      • NSTimer

        protected NSTimer​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static NSTimer alloc()
      • allocWithZone

        public static NSTimer allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • new_objc

        public static NSTimer new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • scheduledTimerWithTimeIntervalInvocationRepeats

        @NotNull
        public static @NotNull NSTimer scheduledTimerWithTimeIntervalInvocationRepeats​(double ti,
                                                                                       @NotNull
                                                                                       @NotNull NSInvocation invocation,
                                                                                       boolean yesOrNo)
      • scheduledTimerWithTimeIntervalRepeatsBlock

        @NotNull
        public static @NotNull NSTimer scheduledTimerWithTimeIntervalRepeatsBlock​(double interval,
                                                                                  boolean repeats,
                                                                                  @NotNull
                                                                                  @NotNull NSTimer.Block_scheduledTimerWithTimeIntervalRepeatsBlock block)
        Creates and returns a new NSTimer object initialized with the specified block object and schedules it on the current run loop in the default mode. - parameter: ti The number of seconds between firings of the timer. If seconds is less than or equal to 0.0, this method chooses the nonnegative value of 0.1 milliseconds instead - parameter: repeats If YES, the timer will repeatedly reschedule itself until invalidated. If NO, the timer will be invalidated after it fires. - parameter: block The execution body of the timer; the timer itself is passed as the parameter to this block when executed to aid in avoiding cyclical references API-Since: 10.0
      • scheduledTimerWithTimeIntervalTargetSelectorUserInfoRepeats

        @NotNull
        public static @NotNull NSTimer scheduledTimerWithTimeIntervalTargetSelectorUserInfoRepeats​(double ti,
                                                                                                   @NotNull
                                                                                                   @NotNull java.lang.Object aTarget,
                                                                                                   @NotNull
                                                                                                   @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                                   @Nullable
                                                                                                   @Nullable java.lang.Object userInfo,
                                                                                                   boolean yesOrNo)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • timerWithTimeIntervalInvocationRepeats

        @NotNull
        public static @NotNull NSTimer timerWithTimeIntervalInvocationRepeats​(double ti,
                                                                              @NotNull
                                                                              @NotNull NSInvocation invocation,
                                                                              boolean yesOrNo)
      • timerWithTimeIntervalRepeatsBlock

        @NotNull
        public static @NotNull NSTimer timerWithTimeIntervalRepeatsBlock​(double interval,
                                                                         boolean repeats,
                                                                         @NotNull
                                                                         @NotNull NSTimer.Block_timerWithTimeIntervalRepeatsBlock block)
        Creates and returns a new NSTimer object initialized with the specified block object. This timer needs to be scheduled on a run loop (via -[NSRunLoop addTimer:]) before it will fire. - parameter: timeInterval The number of seconds between firings of the timer. If seconds is less than or equal to 0.0, this method chooses the nonnegative value of 0.1 milliseconds instead - parameter: repeats If YES, the timer will repeatedly reschedule itself until invalidated. If NO, the timer will be invalidated after it fires. - parameter: block The execution body of the timer; the timer itself is passed as the parameter to this block when executed to aid in avoiding cyclical references API-Since: 10.0
      • timerWithTimeIntervalTargetSelectorUserInfoRepeats

        @NotNull
        public static @NotNull NSTimer timerWithTimeIntervalTargetSelectorUserInfoRepeats​(double ti,
                                                                                          @NotNull
                                                                                          @NotNull java.lang.Object aTarget,
                                                                                          @NotNull
                                                                                          @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                          @Nullable
                                                                                          @Nullable java.lang.Object userInfo,
                                                                                          boolean yesOrNo)
      • version_static

        public static long version_static()
      • fire

        public void fire()
      • fireDate

        @NotNull
        public @NotNull NSDate fireDate()
      • initWithFireDateIntervalRepeatsBlock

        public NSTimer initWithFireDateIntervalRepeatsBlock​(@NotNull
                                                            @NotNull NSDate date,
                                                            double interval,
                                                            boolean repeats,
                                                            @NotNull
                                                            @NotNull NSTimer.Block_initWithFireDateIntervalRepeatsBlock block)
        Initializes a new NSTimer object using the block as the main body of execution for the timer. This timer needs to be scheduled on a run loop (via -[NSRunLoop addTimer:]) before it will fire. - parameter: fireDate The time at which the timer should first fire. - parameter: interval The number of seconds between firings of the timer. If seconds is less than or equal to 0.0, this method chooses the nonnegative value of 0.1 milliseconds instead - parameter: repeats If YES, the timer will repeatedly reschedule itself until invalidated. If NO, the timer will be invalidated after it fires. - parameter: block The execution body of the timer; the timer itself is passed as the parameter to this block when executed to aid in avoiding cyclical references API-Since: 10.0
      • initWithFireDateIntervalTargetSelectorUserInfoRepeats

        public NSTimer initWithFireDateIntervalTargetSelectorUserInfoRepeats​(@NotNull
                                                                             @NotNull NSDate date,
                                                                             double ti,
                                                                             @NotNull
                                                                             @NotNull java.lang.Object t,
                                                                             @NotNull
                                                                             @NotNull org.moe.natj.objc.SEL s,
                                                                             @Nullable
                                                                             @Nullable java.lang.Object ui,
                                                                             boolean rep)
      • invalidate

        public void invalidate()
      • isValid

        public boolean isValid()
      • setFireDate

        public void setFireDate​(@NotNull
                                @NotNull NSDate value)
      • setTolerance

        public void setTolerance​(double value)
        Setting a tolerance for a timer allows it to fire later than the scheduled fire date, improving the ability of the system to optimize for increased power savings and responsiveness. The timer may fire at any time between its scheduled fire date and the scheduled fire date plus the tolerance. The timer will not fire before the scheduled fire date. For repeating timers, the next fire date is calculated from the original fire date regardless of tolerance applied at individual fire times, to avoid drift. The default value is zero, which means no additional tolerance is applied. The system reserves the right to apply a small amount of tolerance to certain timers regardless of the value of this property. As the user of the timer, you will have the best idea of what an appropriate tolerance for a timer may be. A general rule of thumb, though, is to set the tolerance to at least 10% of the interval, for a repeating timer. Even a small amount of tolerance will have a significant positive impact on the power usage of your application. The system may put a maximum value of the tolerance. API-Since: 7.0
      • timeInterval

        public double timeInterval()
      • tolerance

        public double tolerance()
        Setting a tolerance for a timer allows it to fire later than the scheduled fire date, improving the ability of the system to optimize for increased power savings and responsiveness. The timer may fire at any time between its scheduled fire date and the scheduled fire date plus the tolerance. The timer will not fire before the scheduled fire date. For repeating timers, the next fire date is calculated from the original fire date regardless of tolerance applied at individual fire times, to avoid drift. The default value is zero, which means no additional tolerance is applied. The system reserves the right to apply a small amount of tolerance to certain timers regardless of the value of this property. As the user of the timer, you will have the best idea of what an appropriate tolerance for a timer may be. A general rule of thumb, though, is to set the tolerance to at least 10% of the interval, for a repeating timer. Even a small amount of tolerance will have a significant positive impact on the power usage of your application. The system may put a maximum value of the tolerance. API-Since: 7.0
      • userInfo

        @Nullable
        public @Nullable java.lang.Object userInfo()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.