Don't use human timestamps....use the time() function to return the timestamp in seconds since the Epoch.
If you want to test how long a client has been idle, compare the timestamp (in seconds) to the current time.
Each time the user views a new page on the site, store the current time:
$online_user[lastseen] = time();
Then, if you want to show people idle for more than 5 minutes:
if( time() - $online_user[lastseen] > 600 )
print $online_user[username] . " idle for more than 5 minutes<br>\n";
Of course, where you store your data (probably a database) is up to you 🙂
-Rich