How to dynamically change the frequency of update calls