EventTimeSource 的 NewTimer 在 Reset 之后会送出旧时间
EventTimeSource 的 NewTimer 在 Reset 之后会送出旧时间: a task in MiMo-V2.6-RL-oss: Agentic RL Environments (MiMo RL release). EventTimeSource 的 NewTimer 在 Reset 之后会送出旧时间 我在写单元测试时用 clock.NewEventTimeSource() 做 fake clock,通过 NewTimer 拿到 (<-chan time.Time, Timer) 来模拟一个会触发的定时器。我想在同一个 timer 上 fire 两次:先让它 fire…
The task
EventTimeSource 的 NewTimer 在 Reset 之后会送出旧时间 我在写单元测试时用 clock.NewEventTimeSource() 做 fake clock,通过 NewTimer 拿到 (<-chan time.Time, Timer) 来模拟一个会触发的定时器。我想在同一个 timer 上 fire 两次:先让它 fire 一次、读出时间、验证;然后 Reset 一个新的 duration,再 advance 时间让它第二次 fire,从 channel 里读出第二次的时间。 期望行为是跟标准库…
Part of XiaomiMiMo/MiMo-V2.6-RL-oss.