You can add a before_filter to your ApplicationController to set the current date/time in the last_request_at field in your users table, which you'd have to add first via a migration. In the method called from the before_filter, you wanna make sure that the user is authenticated first, of course. And you may want to except the filter for actions not requiring authentication.
Then, assuming you've included the Timeoutable module in your User model, you can see if the user's session is current or not by making a call like this:
user.timedout?(user.last_request_at)
The timedout?(last_access) method, defined in the Timeoutable module, will compare the Devise session timeout with the last request time/date.
As a side note, you might want to only update last_request_at if the last last_request_at value is greater than a minute ago (or any time interval you choose). Otherwise, if your page makes lots of controller calls, like mine does via AJAX, there are a lot of unnecessary db updates in one request.