Is there any way to get a delay in a function

yes but with a custom event i cant get an output from a node