SetStep updates the amount that simulated time advances on every call to Now.
(d time.Duration)
| 239 | |
| 240 | // SetStep updates the amount that simulated time advances on every call to Now. |
| 241 | func (c *Clock) SetStep(d time.Duration) { |
| 242 | c.init() |
| 243 | c.mu.Lock() |
| 244 | defer c.mu.Unlock() |
| 245 | c.step = d |
| 246 | } |
| 247 | |
| 248 | // SetTimerChannelSize changes the channel size for any Timer or Ticker created |
| 249 | // in the future. It does not affect those that were already created. |