what time do you want though? lastlogin, lastpost, etc.?
also do you just want to display it? if so, this would work:
PHP Code:
$timediff = TIMENOW - $timefromdb;
if you want to save that difference to the database, specifically the user table, you would have to first add a new field via phpmyadmin or the similar from your site's control panel(not the vbulletin's admin control panel).
then you could update the database with this code:
PHP Code:
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET yournewfield=" . intval($timediff) . " WHERE userid=" . $vbulletin->userinfo['userid'] . "");