From c00d4b8f66820ab19b44cec3c0242317782c94cf Mon Sep 17 00:00:00 2001 From: Yifan Sun Date: Fri, 22 Nov 2024 02:37:12 +0000 Subject: [PATCH] no smart ticking --- monitoring/monitor.go | 5 +++++ sim/ticker.go | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/monitoring/monitor.go b/monitoring/monitor.go index 2876423b..19234386 100644 --- a/monitoring/monitor.go +++ b/monitoring/monitor.go @@ -76,6 +76,11 @@ func (m *Monitor) RegisterPerfAnalyzer(pa *analysis.PerfAnalyzer) { func (m *Monitor) RegisterComponent(c sim.Component) { m.components = append(m.components, c) + tickingComp, ok := c.(*sim.TickingComponent) + if ok { + tickingComp.TickNow(0) + } + m.registerBuffers(c) } diff --git a/sim/ticker.go b/sim/ticker.go index 279c0ee7..a694509e 100644 --- a/sim/ticker.go +++ b/sim/ticker.go @@ -137,10 +137,11 @@ func (c *TickingComponent) NotifyRecv( // Handle triggers the tick function of the TickingComponent func (c *TickingComponent) Handle(e Event) error { now := e.Time() - madeProgress := c.ticker.Tick(now) - if madeProgress { - c.TickLater(now) - } + // madeProgress := + c.ticker.Tick(now) + // if madeProgress { + c.TickLater(now) + // } return nil }