For something like that use the built int time() function.
- Store the value of
time(); something like 1274467343
which is the number of seconds scince
- When ever needed retrive the value
and assign it to
$erlierTime.
- Assign
time() again to the latter
stop time you would want, lets just
call it $latterTime
So now you have something like $erlierTime and $latterTime.
No just do $latterTime - $erlierTime to get the difference in seconds and then do your divisions to get numb of minutes passed, num of hours passed etc.
In order for me or any one to give you a complete script you would need to tell us what your environment is like and what are you working with mysql, sqlite etc... also would need to know how that timer is triggered.