Java Thread.sleep() in JSnippet nodes

Dear KNIMErs,

It's been a few times now that I would have liked to slow down a specific branch of my flows using some delay function. However, Java Thread.sleep() in JSnippet nodes doesn't seem to work. I always get "Unhandled exception type java.lang.InterruptedException" when trying to trigger it. Could I have any more luck with the .wait() function?

Thanks
E

Hi,

just put a try-catch block around it:

try{
  Thread.sleep(...);
}catch(InterruptedException e){}

Hi,

Perfect, thank you very much indeed!

E