Ok, try this one:
When you register session, register a variable and call it Time1
<?
session_save_path("temp");
session_start();
session_register("Time1");
$Time1 = time();
?>
That will store the data on the session
Then, when the user is going to finish session (you have to provide a way for this, a "logout" button), do this:
<?
$timenow = time();
$diff = $timenow - $_SESSION["Time1"];
?>
$diff is the number of seconds the session lasted. Use strftime() for this:
http://www.php.net/strftime
Hope it helps
fLIPIS