I am using lots of timer in my app ..will it be reduce my battery . ? If yes how can i program with effective energy management .?
Thanks
App process is divided into 3 main categories: on-die , on-chip , and off-chip .
On-Die : Process that runs within Processor
On-Chip : Process that runs in Chip, especially RAM
Off-Chip : Process that runs using other hardware, such as Bluetooth, Modem, Storage, etc
Battery Consumption : On-Die < On-Chip < Off-Chip
For NSTimer
, it will run in On-Die & On-Chip , that will spend rather small amount of battery. Depends on what is running in each timer loop, battery usage varies.
welcome to discuss.
NSTimer
is just a method under many others in iOS to schedule a task for later execution. As a rule of thumb, which method you choose to schedule a task has practically no effect on your battery consumption but how often you schedule your task and what you do in your task has.
To optimize battery consumption with periodically scheduled tasks you should keep in mind:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.