Learn R Programming

RKorAPClient (version 1.1.0)

format_duration: Format duration in seconds to human-readable format

Description

Converts a duration in seconds to a formatted string with days, hours, minutes, and seconds. Used for ETA calculations and progress reporting.

Usage

format_duration(seconds)

Value

character string with formatted duration

Arguments

seconds

numeric duration in seconds

Examples

Run this code
if (FALSE) {
format_duration(3661) # "01h 01m 01s"
format_duration(86461) # "1d 00h 01m 01s"
}

Run the code above in your browser using DataLab