README

wcx789ll/moonsim/core/clock does not have a README file

#
Clock

pub(all) struct Clock {
time : SimTime
next_seq : Int64
heap : EventHeap
status : ClockStatus
target_time : Double?
} derive(
Debug
)

#
Clock::active_count

fn Clock::active_count(self : Clock) -> Int

#
Clock::cancel

fn Clock::cancel(self : Clock, id : EventId) -> Bool

#
Clock::filter_events

fn Clock::filter_events(self : Clock, predicate : (PriorityEvent) -> Bool) -> Int

#
Clock::get_event

fn Clock::get_event(self : Clock, id : EventId) -> PriorityEvent?

#
Clock::new

fn Clock::new() -> Clock

#
Clock::next_event

fn Clock::next_event(self : Clock) -> PriorityEvent?

#
Clock::now

fn Clock::now(self : Clock) -> SimTime

#
Clock::now_seconds

fn Clock::now_seconds(self : Clock) -> Double

#
Clock::reset

fn Clock::reset(self : Clock) -> Unit

#
Clock::schedule

fn Clock::schedule(self : Clock, delta_seconds : Double, priority : Int, payload_id : Int) -> EventId

#
Clock::schedule_at

fn Clock::schedule_at(self : Clock, target : SimTime, priority : Int, payload_id : Int) -> EventId

#
Clock::set_target_time

fn Clock::set_target_time(self : Clock, limit_seconds : Double?) -> Unit

#
Clock::status

fn Clock::status(self : Clock) -> ClockStatus

#
ClockStatus

pub(all) enum ClockStatus {
Idle
Running
Paused
Completed
} derive(Eq,
Debug
)

#
EventHeap

pub(all) struct EventHeap {
// private fields
} derive(
Debug
)

#
EventHeap::active_count

fn EventHeap::active_count(self : EventHeap) -> Int

#
EventHeap::cancel_by_id

fn EventHeap::cancel_by_id(self : EventHeap, target_id : EventId) -> Bool

#
EventHeap::clear

fn EventHeap::clear(self : EventHeap) -> Unit

#
EventHeap::filter_events

fn EventHeap::filter_events(self : EventHeap, predicate : (PriorityEvent) -> Bool) -> Int

#
EventHeap::get_event_by_id

fn EventHeap::get_event_by_id(self : EventHeap, target_id : EventId) -> PriorityEvent?

#
EventHeap::is_empty

fn EventHeap::is_empty(self : EventHeap) -> Bool

#
EventHeap::new

fn EventHeap::new() -> EventHeap

#
EventHeap::peek

fn EventHeap::peek(self : EventHeap) -> PriorityEvent?

#
EventHeap::pop

fn EventHeap::pop(self : EventHeap) -> PriorityEvent?

#
EventHeap::push

fn EventHeap::push(self : EventHeap, event : PriorityEvent) -> Unit

#
EventHeap::size

fn EventHeap::size(self : EventHeap) -> Int

#
EventId

pub(all) struct EventId {
seq : Int64
} derive(Eq,
Debug
)

#
EventId::compare

fn EventId::compare(self : EventId, other : EventId) -> Int

#
PriorityEvent

pub(all) struct PriorityEvent {
time : SimTime
priority : Int
id : EventId
cancelled : Bool
payload_id : Int
} derive(
Debug
)

#
PriorityEvent::compare

fn PriorityEvent::compare(self : PriorityEvent, other : PriorityEvent) -> Int

#
SimTime

pub(all) struct SimTime {
val : Double
} derive(Eq,
Debug
)

#
SimTime::compare

fn SimTime::compare(self : SimTime, other : SimTime) -> Int

#
SimTime::from_seconds

fn SimTime::from_seconds(sec : Double) -> SimTime

#
SimTime::op_add

fn SimTime::op_add(self : SimTime, delta : Double) -> SimTime

#
SimTime::to_seconds

fn SimTime::to_seconds(self : SimTime) -> Double

#
SimTime::zero

fn SimTime::zero() -> SimTime

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io