timeout library for callbacks