NSTimer
NSTimer is a class in the Foundation framework of Apple's Cocoa and Cocoa Touch APIs that allows for the scheduling of timer events. It is used to perform a specific action repeatedly at a given interval or once after a specified delay. Timers are essential for tasks that need to happen periodically, such as updating a user interface, performing background processing, or managing game loops.
To create an NSTimer, you typically use one of its class methods, such as scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:. This
Once a timer is created and scheduled, it will fire according to its configuration. It is crucial
NSTimer relies on the run loop to operate. The run loop processes input events and schedules tasks,