code: func (m *Machine) OnTimerTick(tickNonce int64) error {
  	// Silently skip unexpected, late or canceled ticks. This is fine.
  	switch {
  	case m.State.IsSuspended():
  		return nil
  	case m.State.LastTick.TickNonce != tickNonce:
  		return nil
  	}
  
  	// Report error (to trigger a retry) if the tick happened unexpectedly soon.
  	// Allow up to 50ms clock drift, but correct it to be 0. This is important for
  	// getting the correct next tick time from an absolute schedule. If we pass
  	// m.Now to the cron schedule uncorrected, we'll just get the time of the
  	// already scheduled tick (the one we are handling now, since uncorrected
  	// m.Now is before it).
  	//
  	// Note that m.Now is part of inputs and must not be mutated. We propagate
  	// the corrected time via the call stack.
  	now := m.Now
  	switch delay := now.Sub(m.State.LastTick.When); {
  	case delay < -50*time.Millisecond:
  		return fmt.Errorf("tick happened %s before it was expected", -delay)
  	case delay < 0:
  		now = m.State.LastTick.When
  	}
  
  	// The scheduled time has come!
  	m.State.Generation = m.nextGen()
  	m.Actions = append(m.Actions, StartInvocationAction{
  		Generation: m.State.Generation,
  	})
  	m.State.LastTick = TickLaterAction{}
  
  	// Start waiting for a new tick right away if on an absolute schedule or just
  	// keep the tick state clear for relative schedules: new tick will be set when
  	// RewindIfNecessary() is manually called by whoever handles the cron.
  	if m.Schedule.IsAbsolute() {
  		m.rewindIfNecessary(now)
  	}
  
  	return nil
  }
docs: // OnTimerTick happens when a scheduled timer tick (added with TickLaterAction)
  // occurs.
  //
  // Returns an error if the tick happened too soon.