Rev Language Reference


time - Get the time information

Get the current system time.

Usage

time(String option)

Arguments

option : String (pass by value)
The format of the time.
Default : fromBeginning
Options : year|day|seconds|milliseconds|fromBeginning

Return Type

Details

"year" reports the current year (e.g. 2000). "day" returns the index of the day in the year (e.g. Jan 1 = 1; Feb 1 = 32). "(milli)seconds" returns the number of (milli)seconds that have elapsed since midnight. "fromBeginning", the default, returns the number of milliseconds that have elapsed since 1400-Jan-01 00:00:00, the earliest representable date in the boost library's implementation of the Gregorian date system.

Example

time()

# Wait a little bit
sum = 0
for (i in 1:10000) sum += i
# Now print the time again
time()