When you want your shader to change something over time, you can add a Time-based Shader Input to your project and pass its timer values to your shader. Use Shader Input -> Timer from the Shader Path toolbar to add one to your project. You can change the Time-based Shader Input's name by double-clicking its label and typing a new name.
This control has two outputs: duration and elapsed, and each can be connected to a different shader input of your choosing. You can change the duration of the timer, and there is a slider that allows you vary the speed to slower or faster than your specified duration (fully to the left pauses the timer).
To connect this control's shader inputs to your shader parameters:
When the connection is complete you will see your new connection on the Shader Path and the value will be immediately passed to that parameter every frame (no need to recompile the shader). You can use the speed slider and/or change durations and see the effect in your render in real time.