netcliff(中山狼) 那么具体参数呢?

解决方案 »

  1.   

    sleep(10);//就是sleep 10ms由此类推,参数应该是整型
      

  2.   

    参数仅仅是毫秒数
    如:Sleep(1000),就是等待1秒钟
      

  3.   

    Sleep
    The Sleep function suspends the execution of the current thread for a specified interval. VOID Sleep(
      DWORD dwMilliseconds   // sleep time in milliseconds
    );
     
    Parameters
    dwMilliseconds 
    Specifies the time, in milliseconds, for which to suspend execution. A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. A value of INFINITE causes an infinite delay. 
      

  4.   

    在VC中同样是Sleep,具体的定义看MSDN,如下:VOID Sleep(
      DWORD dwMilliseconds   // sleep time in milliseconds
    );
     
      

  5.   

    是Sleep,它是个API函数。
    在主线程里小心使用,会dead lock!!