Timer and variable rate

Haven’t found this by searching…

I have a simple class that puts a fan on the stage, and when I click a button, the button starts a timer and the fan begins to rotate.

I would like to use a slider rather than a button to activate the fan, and what’s more, I would like the fan to rotate faster or slower depending on the position I choose on the slider.

Any insights into how to do this? I believe it involves changing the delay, but I don’t know how to do that.

Thanks,
Tim