Function interval decorator