def METHOD_NAME(self, timestamp: int, duty_cycle: float):
    """
    Called when ``pbdrv_motor_driver_set_duty_cycle()`` is called.
    """
    # Simulate the motor up to the current time, with previous actuation.
    time = timestamp / 1000000
    self.sim_motor.simulate(time)
    # Set new actuation signal from now on.
    self.sim_motor.actuate(time, numpy.array([duty_cycle]))
    self.coasting = False