Creates a debounced function that delays the given func
by a given wait time in milliseconds. If the method is called
again before the timeout expires, the previous call will be
aborted.
A debounced function that will be delayed by a given wait
time in milliseconds. If the method is called again before
the timeout expires, the previous call will be aborted.