Click here to Skip to main content
15,902,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Combobox.. Pin
Bacon Ultimate Cheeseburger14-Aug-09 10:29
Bacon Ultimate Cheeseburger14-Aug-09 10:29 
QuestionNon-blocking COM method calls Pin
sashoalm13-Aug-09 21:11
sashoalm13-Aug-09 21:11 
AnswerRe: Non-blocking COM method calls Pin
Garth J Lancaster13-Aug-09 23:49
professionalGarth J Lancaster13-Aug-09 23:49 
GeneralRe: Non-blocking COM method calls Pin
sashoalm14-Aug-09 8:56
sashoalm14-Aug-09 8:56 
AnswerRe: Non-blocking COM method calls Pin
KarstenK14-Aug-09 2:57
mveKarstenK14-Aug-09 2:57 
QuestionCan I use select instead Sleep? Pin
hanlei000000000913-Aug-09 20:48
hanlei000000000913-Aug-09 20:48 
AnswerRe: Can I use select instead Sleep? Pin
KarstenK13-Aug-09 21:11
mveKarstenK13-Aug-09 21:11 
AnswerRe: Can I use select instead Sleep? Pin
Rajesh R Subramanian13-Aug-09 21:17
professionalRajesh R Subramanian13-Aug-09 21:17 
hanlei0000000009 wrote:
I need my program sleep 1 microsecond, but Sleep() can not do this.


Neither can any other API do this (under Windows). Windows was never designed to provide this kind of functionality (it is not a real-time OS).

If you use something like Sleep(2), your program may sleep for 2 milliseconds, may be 3, or 4, or say even 100 ms. There's no guarantee about this. The thread scheduler tries its levels best to put your thread to an 'unschedulable' state for as close as possible, to what you've asked. But, it can almost never be exact.

So, while Windows cannot even promise you the precision of milliseconds, you can forget microseconds, which is 1000 times the precision of milliseconds!


It is a crappy thing, but it's life -^ Carlo Pallini

AnswerRe: Can I use select instead Sleep? Pin
Stuart Dootson13-Aug-09 21:37
professionalStuart Dootson13-Aug-09 21:37 
AnswerRe: Can I use select instead Sleep? Pin
David Crow14-Aug-09 2:42
David Crow14-Aug-09 2:42 
AnswerRe: Can I use select instead Sleep? Pin
harold aptroot14-Aug-09 3:00
harold aptroot14-Aug-09 3:00 
GeneralRe: Can I use select instead Sleep? Pin
Rajesh R Subramanian14-Aug-09 5:24
professionalRajesh R Subramanian14-Aug-09 5:24 
GeneralRe: Can I use select instead Sleep? Pin
harold aptroot14-Aug-09 5:33
harold aptroot14-Aug-09 5:33 
GeneralRe: Can I use select instead Sleep? Pin
Rajesh R Subramanian14-Aug-09 5:45
professionalRajesh R Subramanian14-Aug-09 5:45 
GeneralRe: Can I use select instead Sleep? Pin
harold aptroot14-Aug-09 5:47
harold aptroot14-Aug-09 5:47 
GeneralRe: Can I use select instead Sleep? Pin
Rajesh R Subramanian14-Aug-09 8:46
professionalRajesh R Subramanian14-Aug-09 8:46 
GeneralRe: Can I use select instead Sleep? Pin
harold aptroot14-Aug-09 9:00
harold aptroot14-Aug-09 9:00 
GeneralRe: Can I use select instead Sleep? Pin
Rajesh R Subramanian14-Aug-09 9:40
professionalRajesh R Subramanian14-Aug-09 9:40 
GeneralRe: Can I use select instead Sleep? Pin
harold aptroot14-Aug-09 10:03
harold aptroot14-Aug-09 10:03 
AnswerRe: Can I use select instead Sleep? Pin
hanlei000000000915-Aug-09 3:41
hanlei000000000915-Aug-09 3:41 
QuestionGrab Key board focus Pin
aks.13-Aug-09 18:51
aks.13-Aug-09 18:51 
AnswerRe: Grab Key board focus Pin
«_Superman_»13-Aug-09 18:58
professional«_Superman_»13-Aug-09 18:58 
QuestionSMTP: all are not working? Pin
includeh1013-Aug-09 15:03
includeh1013-Aug-09 15:03 
AnswerRe: SMTP: all are not working? Pin
zhu_lin13-Aug-09 15:46
zhu_lin13-Aug-09 15:46 
AnswerRe: SMTP: all are not working? Pin
Bacon Ultimate Cheeseburger13-Aug-09 15:48
Bacon Ultimate Cheeseburger13-Aug-09 15:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.