Class Time

(foreign) class Time {    struct tm local;}

Instances of this class represent a single point in time. This class also includes static methods to provide a few extra features.


define clock: Double static

Returns the number of seconds of CPU time the interpreter has used.

define now: Time static

Returns a Time instance representing the current system time.

define to_s: String

Return a String representation of a Time instance.

Internally, this calls strftime with "%Y-%m-%d %H:%M:%S %z".

Example output: "2016-7-10 16:30:00 -0800".

define since_epoch: Integer

Returns the value of self as a number of seconds since the epoch.