k, check this out (using DBClassic):
rem setup
sync on:backdrop on:color backdrop rgb(0,0,0)
rem main variables
ctime = timer()
atime = 0
dtime1 = 0
dtime2 = 0
dtime3 = 0
pause = 0
do
rem dtime2 is the lag caused by pause which is initially 0
atime = timer() - ctime + dtime2
set cursor 100,100:print (atime)/1000
rem during pause dtime2 is the time from pause to un-pause
if pause = 1 then dtime2 = dtime3 + (timer() - dtime1)
rem once you pause, dtime1 stores timer value
rem dtime3 is the history value of dtime2 from past pauses
if inkey$() = "p" then pause = 1:dtime1 = timer():dtime3 = dtime2
if inkey$() = "o" then pause = 0
sync
loop
there could be a shorter way to do this, maybe with less variables but this is off the top of my head

the code should work though!
HIH
p.s. tell me if it works, i'll probably post it on the codebase incase another person has a simillar problem.