Takes a function, returns a function that will can only be called a certain amount of times per second.