Learn R Programming

oce (version 0.2-1)

secondsToCtime: Convert a time interval to a colon-separated string

Description

Convert a time interval to a colon-separated string

Usage

secondsToCtime(sec)

Arguments

sec
length of time interval in seconds.

Value

  • A string with a colon-separated time interval.

Details

Strings are

See Also

See ctimeToSeconds, the inverse of this.

Examples

Run this code
library(oce)
cat("10 s = ", secondsToCtime(10), "", sep="")
cat("61 s = ", secondsToCtime(61), "", sep="")
cat("86400 s = ", secondsToCtime(86400), "", sep="")

Run the code above in your browser using DataLab