Returns the estimated minutes remaining until all power sources (battery and/or UPS's) are empty, or returns kIOPSTimeRemainingUnlimited if attached to an unlimited power source.


CFTimeInterval IOPSGetTimeRemainingEstimate(void);

Return Value

Returns kIOPSTimeRemainingUnknown if the OS cannot determine the time remaining.

Returns kIOPSTimeRemainingUnlimited if the system has an unlimited power source.

Otherwise returns a positive number of type CFTimeInterval, indicating the time remaining in seconds until all power sources are depleted.


If attached to an "Unlimited" power source, like AC power or any external source, the return value is kIOPSTimeRemainingUnlimited

If the system is on "Limited" power, like a battery or UPS, but is still calculating the time remaining, which may take several seconds after each system power event (e.g. waking from sleep, or unplugging AC Power), the return value is kIOPSTimeRemainingUnknown

Otherwise, if the system is on "Limited" power and the system has an accurate time remaining estimate, the system returns a CFTimeInterval estimate of the time remaining until the system is out of battery power.

If you require more detailed battery information, use IOPSCopyPowerSourcesInfo> and IOPSGetPowerSourceDescription>.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software