Allow to specify a max time the runAllTasks() is allowed to run before it returns and make NioEventLoop make use of it to trigger an io select