[][src]Struct livesplit_core::AtomicDateTime

pub struct AtomicDateTime {
    pub time: DateTime<Utc>,
    pub synced_with_atomic_clock: bool,
}

An Atomic Date Time represents a UTC Date Time that tries to be as close to an atomic clock as possible.

Fields

time: DateTime<Utc>

The UTC Date Time represented by this Atomic Date Time.

synced_with_atomic_clock: bool

Represents whether the date time is actually properly derived from an atomic clock. If the synchronization with the atomic clock didn't happen yet or failed, this is set to false.

Methods

impl AtomicDateTime[src]

pub fn new(time: DateTime<Utc>, synced_with_atomic_clock: bool) -> Self[src]

Creates a new Atomic Date Time from the UTC Date Time and the information of whether this Date Time is derived from an atomic clock or the local system that may be out of sync with the atomic clock.

pub fn now() -> Self[src]

Creates a new Atomic Date Time that describes the current moment in time. If a successful synchronization with an atomic clock occurred, this value is marked as synchronized. Otherwise the local system's timer is used.

Warning

livesplit-core doesn't synchronize with any atomic clock yet.

Trait Implementations

impl Copy for AtomicDateTime[src]

impl Clone for AtomicDateTime[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<AtomicDateTime> for AtomicDateTime[src]

impl Debug for AtomicDateTime[src]

impl Sub<AtomicDateTime> for AtomicDateTime[src]

type Output = TimeSpan

The resulting type after applying the - operator.

impl Sub<DateTime<Utc>> for AtomicDateTime[src]

type Output = TimeSpan

The resulting type after applying the - operator.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.