Timer can also be used at ClientSide using the following Code:
var _timer;
function StartTimer() {
if (_timer == null) {
var timeInterval = document.getElementById("hdnTimeInterval").value;
var timeValue = document.getElementById(timeInterval).value;
if (timeValue != null || timeValue != undefined) {
_timer = window.setInterval(EndTimer, timeValue);
}
}
}
function EndTimer() {
if (_timer != null) {
window.clearInterval(_timer);
_timer = null;
}
}
hdnTimeInterval - will be your time interval in milliseconds
window.setInterval - Is used to call a function on reaching the set time interval.
In the above case I have called EndTimer function to end the timer.
Hope this will be useful.