use crate::host::error::HostApiError;
use crate::services::timer::types::{TimerCallback, TimerId, TimerMode};
use async_trait::async_trait;
use std::time::Duration;
#[async_trait]
pub trait TimerManager: Send + Sync {
async fn set_timer(
&self,
delay: Duration,
mode: TimerMode,
callback: TimerCallback,
) -> Result<TimerId, HostApiError>;
async fn cancel_timer(&self, id: TimerId) -> Result<(), HostApiError>;
async fn cancel_all(&self) -> Result<(), HostApiError>;
}