FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    VirtualTimeClock

    trait · ferroui-reactive · v0.5.0

    trait VirtualTimeClock: 'static
    

    The time of a virtual-time scheduler: what the abstract members of upstream's VirtualTimeSchedulerBase state (Add, ToDateTimeOffset, ToRelative), and how an absolute schedule treats a due time (ScheduleAbsolute, which a derived scheduler may override).

    View source

    Members

    Absolute

    type Absolute: Ord + Copy + 'static
    

    The absolute time (TAbsolute).

    Source

    Relative

    type Relative: Copy + 'static
    

    The relative time (TRelative).

    Source

    add

    fn add(absolute: <Self as >::Absolute, relative: <Self as >::Relative) -> <Self as >::Absolute
    

    absolute moved by relative (Add).

    Source

    to_system_time

    fn to_system_time(absolute: <Self as >::Absolute) -> SystemTime
    

    The absolute time as a time of the system (ToDateTimeOffset).

    Source

    to_relative

    fn to_relative(duration: Duration) -> <Self as >::Relative
    

    A duration as a relative time (ToRelative).

    Source

    subtract

    fn subtract(absolute: <Self as >::Absolute, _duration: Duration) -> <Self as >::Absolute
    

    absolute moved back by duration: what upstream's Add does with the negative relative time of a due time in the past. The default keeps absolute (the past is due now).

    Source

    adjust_due_time

    fn adjust_due_time(due_time: <Self as >::Absolute, _clock: <Self as >::Absolute) -> <Self as >::Absolute
    

    The due time an absolute schedule uses for due_time when the clock is at clock (ScheduleAbsolute): due_time itself. The test scheduler moves work due now or earlier to one tick later.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.