time check before executing func for long running func