调用API函数:CreateWaitableTimer然后调用WaitForSingleObject就可以了。

解决方案 »

  1.   

    procedure Delay(ATime:Longint);
    var t1,t2:int;
    begin
      t1:=GetTickCount;
      T2:=t1;
      while t2-t1<Atime do
        T2:=GetTickCount;
    end;
      

  2.   

    用TTimer控件也可以,要看为什么要延时?
      

  3.   

    向COM1写AT命令,,有好几个号码在拨.我发现如果不时延的话只能拨出一个号码,所以.多谢大家,我是菜鸟,,呵呵.我用sleep.
      

  4.   

    向COM1写AT命令不能有sleep,sleep后使该进程完全挂起,根本拨不了号
    最好用Timer
    检测上一号拨通后再拨下一个号
      

  5.   

    procedure Delay(msecs:integer);var
    FirstTickCount:longint;beginFirstTickCount:=GetTickCount;
    repeat
    Application.ProcessMessages;
    until ((GetTickCount-FirstTickCount) >= Longint(msecs));end;