I guess that your are talking about the session hash when you write 'session table', isn't it?
What are you using to authenticate your users, I usually install 'restfull_authentication', the way that you will to save the user login time is relative to the plugin that you were using.
To be more general II think that you could save in a session variable the datetime when the user enter to the system doing something like:
... session[:user_log_time] = DateTime.now ...
and then calculate the time that the user was logged with:
On the login action you can do session[:logged_at] = Time.now.to_s and then you can check it with session[:logged_at]