public static WebTask sleepFor ( int seconds ) { return new BaseWebTask ( ) { @ Override public WebPage run ( WebPage initialPage ) { try { Thread . sleep ( seconds * 1000 ) ; } catch ( InterruptedException e ) { logger . warn ( "sleep interrupted" ) ; } return initialPage ; } } ; }
Task that sleeps for the given number of seconds and finally returns the very initial page .