Counting number of seconds spent on site by specific user an

i want to count the number of seconds each user is spending on my page. suppose X user entered the site and he entered at 8 am and leaving at 8:15 am so i want to add this 900 value in that users account...