added Lightweight timer to wrap around setTimeout and setInterval