CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VC/MFC >  基础类

————谁知道时间等待函数?

楼主feihong6(蓝天飞鸿)2002-05-20 21:32:33 在 VC/MFC / 基础类 提问

谁知道VC里的时间等待函数?  
  在DELPHI中是SLEEP,那么C中呢?  
  问题点数:10、回复次数:7Top

1 楼netcliff(中山狼)回复于 2002-05-20 21:33:54 得分 1

也是sleepTop

2 楼feihong6(蓝天飞鸿)回复于 2002-05-20 21:37:18 得分 0

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

3 楼y_may(witch)回复于 2002-05-20 21:40:57 得分 3

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

4 楼morningsing(奈何)回复于 2002-05-20 21:41:43 得分 1

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

5 楼songhonda(小笨鼠)回复于 2002-05-20 21:42:28 得分 1

sleep()  
  delay()Top

6 楼lant(蓝特)回复于 2002-05-20 21:55:11 得分 1

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.    
  Top

7 楼Alice_Hexj(侠盗)回复于 2002-05-20 21:59:27 得分 1

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

8 楼victorlee_lq(victor)回复于 2002-05-20 22:11:06 得分 2

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

相关问题

  • 有谁知道windows2000下关机的API函数?(在线等待)
  • vb中有等待时间的函数吗?
  • 请求介绍一个时间等待函数
  • 在线等待!!急急急!!关于时间函数....
  • (在线等待。。。)如何实时返回程序启动经过的时间?好象有一个函数,有谁知道么,快来砸我!
  • 谁知道获得本机IP地址的API函数? 在线等待..... 送分!
  • 时间的函数?
  • GetOverlappedResult()是等待函数吗?
  • vfp:如何让程序等待一段时间,类似vc的sleep的函数??????
  • VC中用于等待一段时间再检测的函数是什么?

关键词

  • 函数
  • sleep
  • 等待
  • 参数
  • thread
  • execution
  • time
  • in milliseconds

得分解答快速导航

  • 帖主:feihong6
  • netcliff
  • y_may
  • morningsing
  • songhonda
  • lant
  • Alice_Hexj
  • victorlee_lq

相关链接

  • Visual C++类图书
  • Visual C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo