formatDuration
Formats the given duration into the standard tvOS format.
Declaration
String formatDuration(
in int duration
);Parameters
- duration:
An integer specifying the duration, in seconds.
Return Value
A string containing the formatted duration.
Discussion
This function changes a number of seconds into the standard hour:minute:second format. For example, formatDuration(90) returns “1:30”.