Added functionality to track activity using a timer.