Class Time
Instances of this class represent a single point in time. This class also includes static methods to provide a few extra features.
public static define clock: Double
Returns the number of seconds of CPU time the interpreter has used.
public static define now: Time
Returns a Time
instance representing the current system time.
public define since_epoch: Integer
Returns the value of self
as a number of seconds since the epoch.
public 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"
.