pub fn do_at_into(
        when: Instant,
        action: impl Future<Output = T> + 'static,
        tq: TaskQueueHandle,
    ) -> Result<TimerActionOnce<T>> {
        let now = Instant::now();
        let dur = {
            if when > now {
                when.duration_since(now)
            } else {
                Duration::from_micros(0)
            }
        };
        Self::do_in_into(dur, action, tq)
    }
/// Creates a [`TimerActionOnce`] that will execute the associated future
/// once at a specific time in a specific Task Queue.
///
/// # Arguments
///
/// * `when` an [`Instant`] that represents when to execute the action.
/// * `action` a Future to be executed at time `when`.
/// * `tq` the [`TaskQueueHandle`] for the task queue we want.
///
/// # Examples
///
/// ```
/// use glommio::{timer::TimerActionOnce, Latency, LocalExecutorBuilder, Shares};
/// use std::time::{Duration, Instant};
///
/// let handle = LocalExecutorBuilder::new()
///     .spawn(|| async move {
///         let tq = glommio::executor().create_task_queue(
///             Shares::default(),
///             Latency::NotImportant,
///             "test",
///         );
///         let when = Instant::now()
///             .checked_add(Duration::from_millis(100))
///             .unwrap();
///         let action = TimerActionOnce::do_at_into(
///             when,
///             async move {
///                 println!("Executed once");
///             },
///             tq,
///         )
///         .unwrap();
///         action.join().await;
///     })
///     .unwrap();
/// handle.join().unwrap();
/// ```
/// [`Instant`]: https://doc.rust-lang.org/std/time/struct.Instant.html
/// [`TimerActionOnce`]: struct.TimerActionOnce.html
/// [`TaskQueueHandle`]: ../struct.TaskQueueHandle.html
Creates a [`TimerActionOnce`] that will execute the associated future
once at a specific time in a specific Task Queue.
Creates a [ ` TimerActionOnce ` ] that will execute the associated future once at a specific time in a specific Task Queue .
pub fn do_at_into(
        when: Instant,
        action: impl Future<Output = T> + 'static,
        tq: TaskQueueHandle,
    ) -> Result<TimerActionOnce<T>> {
        let now = Instant::now();
        let dur = {
            if when > now {
                when.duration_since(now)
            } else {
                Duration::from_micros(0)
            }
        };
        Self::do_in_into(dur, action, tq)
    }
pub fn do_at_into ( when : Instant , action : impl Future < Output = T > + ' static , tq : TaskQueueHandle , ) -> Result < TimerActionOnce < T > > { let now = Instant :: now ( ) ; let dur = { if when > now { when . duration_since ( now ) } else { Duration :: from_micros ( 0 ) } } ; Self :: do_in_into ( dur , action , tq ) }
Creates a [`TimerActionOnce`] that will execute the associated future
once at a specific time in a specific Task Queue.
Creates a [ ` TimerActionOnce ` ] that will execute the associated future once at a specific time in a specific Task Queue .
when
Instant
action
impl Future<Output = T> + 'static
tq
TaskQueueHandle
when
Instant
action
impl Future<Output = T> + 'static
tq
TaskQueueHandle
examples
```
use glommio::{timer::TimerActionOnce, Latency, LocalExecutorBuilder, Shares};
use std::time::{Duration, Instant}.


` ` ` use glommio :: { timer :: TimerActionOnce Latency LocalExecutorBuilder Shares } ; use std :: time :: { Duration Instant } .