Timespec
- A record specifying a time value in seconds and nanoseconds.Tm_
Tm
of Eq for Timespec
of Eq for Tm_
of Eq for Tm
for Tm
at
- Returns the specified time in the local timezoneat_utc
- Returns the specified time in UTCempty_tm
get_time
- Returns the current time as a timespec
containing the seconds and nanoseconds since 1970-01-01T00:00:00Z.now
- Returns the current time in the local timezonenow_utc
- Returns the current time in UTCprecise_time_ns
- Returns the current value of a high-resolution performance counter in nanoseconds since an unspecified epoch.precise_time_s
- Returns the current value of a high-resolution performance counter in seconds since an unspecified epoch.strftime
strptime
- Parses the time from the string according to the format string.tzset
time::rustrt
Timespec
type Timespec = {sec: i64, nsec: i32,}
A record specifying a time value in seconds and nanoseconds.
Tm_
type Tm_ = {tm_sec: i32,
tm_min: i32,
tm_hour: i32,
tm_mday: i32,
tm_mon: i32,
tm_year: i32,
tm_wday: i32,
tm_yday: i32,
tm_isdst: i32,
tm_gmtoff: i32,
tm_zone: ~str,
tm_nsec: i32,}
Tm
Tm_(Tm_)
Eq
for Timespec
eq
fn eq(other: & Timespec) -> bool
ne
fn ne(other: & Timespec) -> bool
Eq
for Tm_
eq
fn eq(other: & Tm_) -> bool
ne
fn ne(other: & Tm_) -> bool
Eq
for Tm
eq
fn eq(other: & Tm) -> bool
ne
fn ne(other: & Tm) -> bool
Tm
to_timespec
fn to_timespec() -> Timespec
Convert time to the seconds from January 1, 1970
to_local
fn to_local() -> Tm
Convert time to the local timezone
to_utc
fn to_utc() -> Tm
Convert time to the UTC
ctime
fn ctime() -> ~str
Return a string of the current time in the form "Thu Jan 1 00:00:00 1970".
strftime
fn strftime(format: & str) -> ~str
Formats the time according to the format string.
rfc822
fn rfc822() -> ~str
Returns a time string formatted according to RFC 822.
local: "Thu, 22 Mar 2012 07:53:18 PST" utc: "Thu, 22 Mar 2012 14:53:18 UTC"
rfc822z
fn rfc822z() -> ~str
Returns a time string formatted according to RFC 822 with Zulu time.
local: "Thu, 22 Mar 2012 07:53:18 -0700" utc: "Thu, 22 Mar 2012 14:53:18 -0000"
rfc3339
fn rfc3339() -> ~str
Returns a time string formatted according to ISO 8601.
local: "2012-02-22T07:53:18-07:00" utc: "2012-02-22T14:53:18Z"
at
fn at(clock: Timespec) -> Tm
Returns the specified time in the local timezone
at_utc
fn at_utc(clock: Timespec) -> Tm
Returns the specified time in UTC
empty_tm
fn empty_tm() -> Tm
get_time
fn get_time() -> Timespec
Returns the current time as a timespec
containing the seconds and nanoseconds since 1970-01-01T00:00:00Z.
now
fn now() -> Tm
Returns the current time in the local timezone
now_utc
fn now_utc() -> Tm
Returns the current time in UTC
precise_time_ns
fn precise_time_ns() -> u64
Returns the current value of a high-resolution performance counter in nanoseconds since an unspecified epoch.
precise_time_s
fn precise_time_s() -> float
Returns the current value of a high-resolution performance counter in seconds since an unspecified epoch.
strftime
fn strftime(format: & str, tm: Tm) -> ~str
strptime
fn strptime(s: & str, format: & str) -> Result<Tm, ~str>
Parses the time from the string according to the format string.
tzset
fn tzset()