use time.Duration for pwm