Sets the interval (in nanoseconds) at which to invoke the I/O handlers for the channel.
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The channel whose interval you want to configure.
The number of nanoseconds that must elapse before the scheduling of any I/O handlers is desired.
Flags indicating the desired delivery behavior at the interval time. For a list of flags, see
_io _interval _flags _t
A channel interval is a way for you to receive periodic progress reports on the state of a read or write operation. You can use this feedback to update progress bars or other parts of your application.
If you set an interval on a channel, the handlers for any read or write operations are enqueued at the given interval only if the amount of data that has been processed exceeds the current low-water mark for the channel. Passing the
DISPATCH constant in the
flags parameter forces the enqueueing of the handlers even if the low-water mark is not exceeded.
The system may add a small amount of leeway to the specified interval in order to align the delivery of handlers with other system activity. The purpose of this behavior is to improve overall performance or power consumption for the system.