[][src]Trait glk::traits::Datetime

pub trait Datetime {
    fn current_time(&mut self) -> glktimeval_t;
fn current_simple_time(&mut self, factor: u32) -> i32;
fn time_to_date_utc(&mut self, time: glktimeval_t) -> glkdate_t;
fn time_to_date_local(&mut self, time: glktimeval_t) -> glkdate_t;
fn simple_time_to_date_utc(&mut self, time: i32, factor: u32) -> glkdate_t;
fn simple_time_to_date_local(&mut self, time: i32, factor: u32) -> glkdate_t;
fn date_to_time_utc(&mut self, date: glkdate_t) -> glktimeval_t;
fn date_to_time_local(&mut self, date: glkdate_t) -> glktimeval_t;
fn date_to_simple_time_utc(&mut self, date: glkdate_t, factor: u32) -> i32;
fn date_to_simple_time_local(&mut self, date: glkdate_t, factor: u32) -> i32; }

GLK_MODULE_DATETIME

Required methods

fn current_time(&mut self) -> glktimeval_t

Get the current (wall clock) time.

fn current_simple_time(&mut self, factor: u32) -> i32

Get the current (wall clock) time as a "simple time", which is a single 32-bit integer,

  • that is the UNIX time in seconds divided by the given factor.

fn time_to_date_utc(&mut self, time: glktimeval_t) -> glkdate_t

Convert a time to a broken-out date structure (in UTC).

fn time_to_date_local(&mut self, time: glktimeval_t) -> glkdate_t

Convert a time to a broken-out date structure (as local time).

fn simple_time_to_date_utc(&mut self, time: i32, factor: u32) -> glkdate_t

Convert a "simple time" to a broken-out date structure (in UTC).

fn simple_time_to_date_local(&mut self, time: i32, factor: u32) -> glkdate_t

Convert a "simple time" to a broken-out date structure (in local time).

fn date_to_time_utc(&mut self, date: glkdate_t) -> glktimeval_t

Convert a broken-out date structure (in UTC) to a time structure.

fn date_to_time_local(&mut self, date: glkdate_t) -> glktimeval_t

Convert a broken-out date structure (in local time) to a time structure.

fn date_to_simple_time_utc(&mut self, date: glkdate_t, factor: u32) -> i32

Convert a broken-out date structure (in UTC) to a "simple time".

fn date_to_simple_time_local(&mut self, date: glkdate_t, factor: u32) -> i32

Convert a broken-out date structure (in local time) to a "simple time".

Loading content...

Implementors

Loading content...