不想用POS的话,还可以这样实现:<br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> h1,m1,s1,ms1:word;<br> h2,m2,s2,ms2:word;<br> i:integer;<br>begin<br> DecodeTime(strtotime('0:15:53.45'), H1, M1, S1, MS1);<br> DecodeTime(strtotime('0:15:40.15'), H2, M2, S2, MS2);<br> i:=((m1*60+s1)*1000+ms1)-((m2*60+s2)*1000+ms2); // 这是-的,其他的运算同理<br> ms2:= i mod 1000;<br> i:=trunc((i-ms2)/1000);<br> s2:=i mod 60;<br> i:=trunc((i-s2)/60);<br> m2:=i;<br> edit1.text:='0:'+inttostr(m2)+':'+inttostr(s2)+'.'+inttostr(ms2);<br>end;<br><br>****** 计算的原理同上面lichdr提到的一样 *****