if you have a clock running
try this
h m s var bytes (current time )
x y z var byte (old time )
a b c var byte ( time difference)
carry var bit
time_difference: (assumes current time > old time)
carry=0
c=s-z
if c>127 then
c=c+60
carry=1
endif
b=m-(y+carry)
if b>127 then
b=b+60
carry=1
else
carry=0
endif
a=h-(x+carry)
if a>127 then
a=a+24
carry=1 ;extra day needed to be added
else
carry=0
endif
return
Bookmarks