Function creates and returns a new version of the passed function which will allow its execution limit times in specified period of time