pub struct PendingTimer {
pub id: u32,
pub delay_ms: u32,
pub is_interval: bool,
pub callback_source: String,
pub registered_at_ms: u64,
}Expand description
Timer simulation for the sandbox.
JavaScript timers (setTimeout, setInterval) are intercepted by the bridge and registered here. The sandbox can:
-
Drain immediately — fire all pending callbacks synchronously. This is the default for detonation: malware that delays payloads with setTimeout(fn, 30000) gets triggered instantly.
-
Fast-forward — advance simulated time by N milliseconds, firing callbacks whose delay has elapsed. For researchers who want to step through time.
-
Manual — do nothing until the researcher explicitly drains. For interactive analysis.
A registered timer callback.
Fields§
§id: u32Unique timer ID (returned to JS from setTimeout/setInterval).
delay_ms: u32Delay in milliseconds before the callback fires.
is_interval: boolWhether this is a repeating interval.
callback_source: StringThe callback source code (for observation logging).
registered_at_ms: u64Simulated time at which this timer was registered (ms).
Trait Implementations§
Source§impl Clone for PendingTimer
impl Clone for PendingTimer
Source§fn clone(&self) -> PendingTimer
fn clone(&self) -> PendingTimer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PendingTimer
impl RefUnwindSafe for PendingTimer
impl Send for PendingTimer
impl Sync for PendingTimer
impl Unpin for PendingTimer
impl UnsafeUnpin for PendingTimer
impl UnwindSafe for PendingTimer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more