Type Alias libnotcurses_sys::NcTime

source ·
pub type NcTime = timespec;
Expand description

A time in seconds and nanoseconds.

It assumes that pre-epoch Timespecs have negative tv_sec and positive nsec fields.

A record specifying a time value in seconds and nanoseconds, where nanoseconds represent the offset from the given second.

Aliased Type§

struct NcTime {
    pub tv_sec: i64,
    pub tv_nsec: i64,
}

Fields§

§tv_sec: i64

Seconds.

§tv_nsec: i64

Nanoseconds.

Implementations§

source§

impl NcTime

source

pub fn new(seconds: time_t, nanoseconds: c_long) -> Self

New NcTime with the specified seconds and nanoseconds.