#[macro_export]
macro_rules! timer {
($delay:expr, $func:path $(, $($args:tt)*)? ) => {{
let label = concat!(module_path!(), "::", stringify!($func));
$crate::__internal::core::api::timer::TimerApi::set(
$delay,
label,
$func($($($args)*)?),
)
}};
}
#[macro_export]
macro_rules! timer_interval {
($interval:expr, $func:path $(, $($args:tt)*)? ) => {{
let label = concat!(module_path!(), "::", stringify!($func));
$crate::__internal::core::api::timer::TimerApi::set_interval(
$interval,
label,
move || $func($($($args)*)?),
)
}};
}