Package apple.foundation
Class NSTimer
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.foundation.NSTimer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceNSTimer.Block_initWithFireDateIntervalRepeatsBlockstatic interfaceNSTimer.Block_scheduledTimerWithTimeIntervalRepeatsBlockstatic interfaceNSTimer.Block_timerWithTimeIntervalRepeatsBlock-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSTimer(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static NSTimeralloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voidfire()NSDatefireDate()static longhash_static()NSTimerinit()NSTimerinitWithFireDateIntervalRepeatsBlock(NSDate date, double interval, boolean repeats, NSTimer.Block_initWithFireDateIntervalRepeatsBlock block)Initializes a new NSTimer object using the block as the main body of execution for the timer.NSTimerinitWithFireDateIntervalTargetSelectorUserInfoRepeats(NSDate date, double ti, java.lang.Object t, org.moe.natj.objc.SEL s, java.lang.Object ui, boolean rep)static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)voidinvalidate()static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)booleanisValid()static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)static NSTimerscheduledTimerWithTimeIntervalInvocationRepeats(double ti, NSInvocation invocation, boolean yesOrNo)static NSTimerscheduledTimerWithTimeIntervalRepeatsBlock(double interval, boolean repeats, 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 modestatic NSTimerscheduledTimerWithTimeIntervalTargetSelectorUserInfoRepeats(double ti, java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object userInfo, boolean yesOrNo)voidsetFireDate(NSDate value)voidsetTolerance(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.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()doubletimeInterval()static NSTimertimerWithTimeIntervalInvocationRepeats(double ti, NSInvocation invocation, boolean yesOrNo)static NSTimertimerWithTimeIntervalRepeatsBlock(double interval, boolean repeats, NSTimer.Block_timerWithTimeIntervalRepeatsBlock block)Creates and returns a new NSTimer object initialized with the specified block object.static NSTimertimerWithTimeIntervalTargetSelectorUserInfoRepeats(double ti, java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object userInfo, boolean yesOrNo)doubletolerance()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.java.lang.ObjectuserInfo()static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSTimer alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static 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()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object 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
public static NSTimer scheduledTimerWithTimeIntervalInvocationRepeats(double ti, NSInvocation invocation, boolean yesOrNo)
-
scheduledTimerWithTimeIntervalRepeatsBlock
public static NSTimer scheduledTimerWithTimeIntervalRepeatsBlock(double interval, boolean repeats, 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
-
scheduledTimerWithTimeIntervalTargetSelectorUserInfoRepeats
public static NSTimer scheduledTimerWithTimeIntervalTargetSelectorUserInfoRepeats(double ti, java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, 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
public static NSTimer timerWithTimeIntervalInvocationRepeats(double ti, NSInvocation invocation, boolean yesOrNo)
-
timerWithTimeIntervalRepeatsBlock
public static NSTimer timerWithTimeIntervalRepeatsBlock(double interval, boolean repeats, 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
-
timerWithTimeIntervalTargetSelectorUserInfoRepeats
public static NSTimer timerWithTimeIntervalTargetSelectorUserInfoRepeats(double ti, java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object userInfo, boolean yesOrNo)
-
version_static
public static long version_static()
-
fire
public void fire()
-
fireDate
public NSDate fireDate()
-
initWithFireDateIntervalRepeatsBlock
public NSTimer initWithFireDateIntervalRepeatsBlock(NSDate date, double interval, boolean repeats, 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
-
initWithFireDateIntervalTargetSelectorUserInfoRepeats
public NSTimer initWithFireDateIntervalTargetSelectorUserInfoRepeats(NSDate date, double ti, java.lang.Object t, org.moe.natj.objc.SEL s, java.lang.Object ui, boolean rep)
-
invalidate
public void invalidate()
-
isValid
public boolean isValid()
-
setFireDate
public void setFireDate(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.
-
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.
-
userInfo
public java.lang.Object userInfo()
-
-