Sleep在Delphi7中是什么意思?

解决方案 »

  1.   

    sleep字面意思就能知道了,系统休眠 指定时间  
      

  2.   

    sleep(1000)分时间片给其他线程,并且1000毫秒内当前线程不接受CPU分配的时间片
      

  3.   

    有问题看帮助UnitSysUtilsCategoryflow control routinesDelphi syntax:procedure Sleep(milliseconds: Cardinal);{$IFDEF MSWINDOWS} stdcall; {$ENDIF}C++ syntax:void Sleep(unsigned milliseconds);DescriptionSleep pauses program executions as specified by the milliseconds parameter. Under Windows, Sleep is just a link to the Sleep function in the system API. Under Linux, Sleep calls the usleep library routine.sleep按指定的毫秒时间,停止程序执行一般用在通讯中,比如我要接收一串数据,发请求命令后,此时数据还没传过来,所以要等上一定的时间,此时就用它
      

  4.   

    这个主要用在需要等待的时候,比如条件未满足,可以让程序休眠一段时间,Sleep(1000)表示程序休眠1秒,一秒后再继续执行程序。
      

  5.   

    通俗讲sleep就是啥也不干,傻傻的等偶
      

  6.   

    sleep(X);
    让程序等待(暂停)X毫秒。但在DELPHI7中X值不能少于15,否则无效。 
      

  7.   

    Sleep是一个Delphi函数,完成等待的功能,变量是时间,单位是毫秒。
      

  8.   

    该进程、线程在Sleep时间内不向OS争取时间片,就是睡觉了,不干活了。但是它以ms为单位睡觉。