Improved timer functionality