convert_sec_to_hms: Print time

View source: R/math.R

convert_sec_to_hmsR Documentation

Print time

Description

Internal soundgen function.

Usage

convert_sec_to_hms(time_s, digits = 0)

Arguments

time_s

time (s)

digits

number of digits to preserve for s (1-60 s)

Details

Converts time in seconds to time in y m d h min s for pretty printing.

Value

Returns a character string like "1 h 20 min 3 s"

Examples

time_s = c(.0001, .01, .33, .8, 2.135, 5.4, 12, 250, 3721, 10000,
           150000, 365 * 24 * 3600 + 35 * 24 * 3600 + 3721)
soundgen:::convert_sec_to_hms(time_s)
soundgen:::convert_sec_to_hms(time_s, 2)

soundgen documentation built on Sept. 12, 2024, 6:29 a.m.