soundgen (version 2.6.2)

convert_sec_to_hms: Print time

Description

Internal soundgen function.

Usage

convert_sec_to_hms(time_s, digits = 0)

Value

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

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab