in reply to time session problem

Go forth and get Date::Calc or you could to more work something like this.
$start = time(); ... time passes $stop = time(); $stop - $start = $seconds_elapsed; # bunch of seconds in a minute, minutes in an hour code ...
Update
Holy Stereo Farts!
above is wrong lasst assignment should be:
#seconds_elapsed = $stop - $start;

thx Albannach

Look ... other there ---> Date::Calc grab it and save brain cells.

mitd-Made in the Dark
'My favourite colour appears to be grey.'