Takes in a func, returns a new function that performs the same task as the original, but is capped to only execute at the given rate in milliseconds.
func
rate
Takes in a
func
, returns a new function that performs the same task as the original, but is capped to only execute at the givenrate
in milliseconds.