Click here to Skip to main content
15,897,519 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Pointer to structure Pin
Vancouver4-Jan-07 19:45
Vancouver4-Jan-07 19:45 
GeneralRe: Pointer to structure Pin
David Crow5-Jan-07 3:00
David Crow5-Jan-07 3:00 
GeneralRe: Pointer to structure Pin
Vancouver5-Jan-07 4:41
Vancouver5-Jan-07 4:41 
GeneralRe: Pointer to structure Pin
prasad_som4-Jan-07 19:11
prasad_som4-Jan-07 19:11 
QuestionProblems with Sleep() in thread Pin
acerunner3164-Jan-07 11:42
acerunner3164-Jan-07 11:42 
AnswerRe: Problems with Sleep() in thread Pin
Stephen Hewitt4-Jan-07 12:00
Stephen Hewitt4-Jan-07 12:00 
GeneralRe: Problems with Sleep() in thread Pin
acerunner3164-Jan-07 12:09
acerunner3164-Jan-07 12:09 
GeneralRe: Problems with Sleep() in thread Pin
Stephen Hewitt4-Jan-07 12:19
Stephen Hewitt4-Jan-07 12:19 
acerunner316 wrote:
Is there a way to accurately predict the actual time it takes to post a message?

  It doesn't take long to post a message as it's simply queued. The delay comes into play because of the contents of the queue, the speed at which the receiving thread calls GetMessage and processes the message and thread scheduling.

acerunner316 wrote:
Is there another way I can force the function to execute at specified time intervals, and accurately?

  Probably the most accurate way would be to use a dedicated high priority thread which calls the function directly then sleeps, in a loop. Naturally if the approach is feasible or not in your case depends on what your function does.

acerunner316 wrote:
there something like time()

  Check out GetTickCount.


Steve

GeneralRe: Problems with Sleep() in thread Pin
acerunner3164-Jan-07 14:09
acerunner3164-Jan-07 14:09 
GeneralRe: Problems with Sleep() in thread Pin
Stephen Hewitt4-Jan-07 14:13
Stephen Hewitt4-Jan-07 14:13 
GeneralRe: Problems with Sleep() in thread Pin
acerunner3164-Jan-07 14:18
acerunner3164-Jan-07 14:18 
GeneralRe: Problems with Sleep() in thread Pin
Stephen Hewitt4-Jan-07 14:26
Stephen Hewitt4-Jan-07 14:26 
GeneralRe: Problems with Sleep() in thread Pin
acerunner3164-Jan-07 14:43
acerunner3164-Jan-07 14:43 
GeneralRe: Problems with Sleep() in thread Pin
Stephen Hewitt4-Jan-07 14:58
Stephen Hewitt4-Jan-07 14:58 
GeneralRe: Problems with Sleep() in thread Pin
Chris Losinger4-Jan-07 12:21
professionalChris Losinger4-Jan-07 12:21 
GeneralRe: Problems with Sleep() in thread Pin
Jörgen Sigvardsson4-Jan-07 14:09
Jörgen Sigvardsson4-Jan-07 14:09 
GeneralRe: Problems with Sleep() in thread Pin
Chris Losinger4-Jan-07 14:28
professionalChris Losinger4-Jan-07 14:28 
GeneralRe: Problems with Sleep() in thread Pin
Jörgen Sigvardsson5-Jan-07 2:13
Jörgen Sigvardsson5-Jan-07 2:13 
GeneralRe: Problems with Sleep() in thread Pin
Chris Losinger5-Jan-07 2:43
professionalChris Losinger5-Jan-07 2:43 
GeneralRe: Problems with Sleep() in thread Pin
acerunner3165-Jan-07 8:47
acerunner3165-Jan-07 8:47 
GeneralRe: Problems with Sleep() in thread Pin
Chris Losinger5-Jan-07 8:59
professionalChris Losinger5-Jan-07 8:59 
GeneralRe: Problems with Sleep() in thread Pin
acerunner3165-Jan-07 14:38
acerunner3165-Jan-07 14:38 
GeneralRe: Problems with Sleep() in thread Pin
Chris Losinger5-Jan-07 17:19
professionalChris Losinger5-Jan-07 17:19 
GeneralRe: Problems with Sleep() in thread Pin
acerunner3168-Jan-07 8:41
acerunner3168-Jan-07 8:41 
GeneralRe: Problems with Sleep() in thread Pin
Chris Losinger8-Jan-07 8:55
professionalChris Losinger8-Jan-07 8:55 

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.