Create reentrant timer for recursive functions