Click here to Skip to main content
15,892,643 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how can I clear overlay after using transparentblt Pin
gurucplusplus17-Sep-07 19:27
gurucplusplus17-Sep-07 19:27 
GeneralRe: how can I clear overlay after using transparentblt Pin
Mark Salsbery17-Sep-07 20:17
Mark Salsbery17-Sep-07 20:17 
GeneralRe: how can I clear overlay after using transparentblt Pin
gurucplusplus18-Sep-07 17:55
gurucplusplus18-Sep-07 17:55 
GeneralRe: how can I clear overlay after using transparentblt Pin
Mark Salsbery19-Sep-07 4:54
Mark Salsbery19-Sep-07 4:54 
Questionhow to Convert unsigned char to UTF-8,Unicode? Pin
kcynic15-Sep-07 16:47
kcynic15-Sep-07 16:47 
AnswerRe: how to Convert unsigned char to UTF-8,Unicode? Pin
Nemanja Trifunovic16-Sep-07 1:27
Nemanja Trifunovic16-Sep-07 1:27 
GeneralRe: how to Convert unsigned char to UTF-8,Unicode? Pin
kcynic16-Sep-07 15:30
kcynic16-Sep-07 15:30 
QuestionFunny timing results in threading project Pin
Cyrilix15-Sep-07 10:27
Cyrilix15-Sep-07 10:27 
I'm timing a threading utility that pushes a bunch of work to the thread pool, executes the work, and then figures out how much time it has taken overall. The concept is really simple. That said, when I run the tests regularly in release mode with /O2 enabled, the time either takes 0.25s or 0.33s, and it randomly alternates between the two. Now, if I add a printf() statement right when the thread pool is shutting down, printing the number of work units that each thread has completed, the timing result is always 0.25s -- and by always, I mean 100%. It will never be 0.33s. In fact, I tried replacing this printf() statement with one that simply prints out "WTF?", and the result is the same (the time always ends up being 0.25s and never 0.33s). This makes me think that there is something with console operations that is changing the innards of my timing, however, I have no clue what it is.

For reference, I am using Visual C++ 2005, and QueryPerformanceCounter() / GetTickCount() to do my timing (I've used both, and they both give me these kinds of different results).

Anyone know what's going on?

EDIT: I forgot to mention one important thing. Here is how my timing works:

#1: Initialize thread pool
#2: Get count of start time
#3: Queue and process work
#4: Get count of end time
#5: Release thread pool

Now, we can truly understand the hilarity of these results, as the printf() statement, within the release of the thread pool, is not even within the count of the start and end! It's as if something I am doing in the future is changing the result of what is happening now.
AnswerRe: Funny timing results in threading project Pin
carrivick15-Sep-07 20:51
carrivick15-Sep-07 20:51 
GeneralRe: Funny timing results in threading project Pin
Cyrilix16-Sep-07 7:07
Cyrilix16-Sep-07 7:07 
AnswerRe: Funny timing results in threading project Pin
Randor 16-Sep-07 6:07
professional Randor 16-Sep-07 6:07 
GeneralRe: Funny timing results in threading project Pin
Cyrilix16-Sep-07 7:05
Cyrilix16-Sep-07 7:05 
QuestionHow export functions from an exe file? Pin
Hongjun Ge15-Sep-07 7:18
Hongjun Ge15-Sep-07 7:18 
AnswerRe: How export functions from an exe file? Pin
Chris Losinger15-Sep-07 7:23
professionalChris Losinger15-Sep-07 7:23 
GeneralRe: How export functions from an exe file? Pin
Nemanja Trifunovic15-Sep-07 12:29
Nemanja Trifunovic15-Sep-07 12:29 
GeneralRe: How export functions from an exe file? Pin
Chris Losinger15-Sep-07 13:17
professionalChris Losinger15-Sep-07 13:17 
GeneralRe: How export functions from an exe file? Pin
Eytukan15-Sep-07 17:34
Eytukan15-Sep-07 17:34 
GeneralRe: How export functions from an exe file? Pin
Hongjun Ge16-Sep-07 2:24
Hongjun Ge16-Sep-07 2:24 
AnswerRe: How export functions from an exe file? Pin
Eytukan15-Sep-07 17:49
Eytukan15-Sep-07 17:49 
GeneralRe: How export functions from an exe file? Pin
glitteringsound18-Mar-10 10:16
glitteringsound18-Mar-10 10:16 
JokeRe: How export functions from an exe file? Pin
Rama Krishna Vavilala20-Mar-10 7:48
Rama Krishna Vavilala20-Mar-10 7:48 
QuestionToolbar with two columns how Pin
sharp_k15-Sep-07 5:35
sharp_k15-Sep-07 5:35 
AnswerRe: Toolbar with two columns how Pin
Mark Salsbery16-Sep-07 8:27
Mark Salsbery16-Sep-07 8:27 
GeneralRe: Toolbar with two columns how Pin
sharp_k17-Sep-07 12:21
sharp_k17-Sep-07 12:21 
QuestionWinMain and argv/argc Pin
dellthinker15-Sep-07 5:29
dellthinker15-Sep-07 5:29 

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.