Del via


SysEvent_DeferEvent Function

Header: #include <applibs/sysevent.h>

Attempts to defer an event for the specified duration. This function should only be called when the event status is SysEvent_Status_Pending. If the event is not pending, the call fails.

int SysEvent_DeferEvent(SysEvent_Events event, uint32_t requested_defer_time_in_minutes);

Parameters

  • event The type of event to defer.

  • requested_defer_time_in_minutes The duration of the deferral, in minutes. The maximum deferral time is 24 hours for OS updates and 167 hours for applications. If you request a deferral longer than the maximum allowed for the event, deferral is truncated at the maximum.

Errors

Returns -1 if an error is encountered and sets errno to the error value.

  • EACCES: The application doesn't have the capability to defer the specified event.

Any other errno may also be specified, but there's no guarantee that the same behavior will be retained through system updates.

Return value

Returns 0 for success, or -1 for failure, in which case errno is set to the error value.

Application manifest requirements

The application manifest must include the SystemEventNotifications and SoftwareUpdateDeferral capabilities.