Click here to Skip to main content
16,012,759 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help With App Licenses Pin
JimmyRopes10-Sep-04 16:33
professionalJimmyRopes10-Sep-04 16:33 
GeneralCFileDialog whata f...??? hehehee Pin
Nitro_gen18-Jun-04 10:09
Nitro_gen18-Jun-04 10:09 
GeneralRe: CFileDialog whata f...??? hehehee Pin
Johan Rosengren19-Jun-04 20:26
Johan Rosengren19-Jun-04 20:26 
GeneralRe: CFileDialog whata f...??? hehehee Pin
Nitro_gen23-Jun-04 9:42
Nitro_gen23-Jun-04 9:42 
GeneralGetting Time (milliseconds)m of Seconds Pin
Grahamfff18-Jun-04 10:07
Grahamfff18-Jun-04 10:07 
GeneralRe: Getting Time (milliseconds)m of Seconds Pin
John R. Shaw18-Jun-04 11:12
John R. Shaw18-Jun-04 11:12 
GeneralRe: Getting Time (milliseconds)m of Seconds Pin
gamitech18-Jun-04 11:15
gamitech18-Jun-04 11:15 
GeneralRe: Getting Time (milliseconds)m of Seconds Pin
Nick Parker18-Jun-04 11:34
protectorNick Parker18-Jun-04 11:34 
I was just working on this a while ago and Mike Dunn pointed me in the direction of the FILETIME. With this you get 100 nanosecond resolution. Here's a quick example of what I did:

FILETIME start, end;
SYSTEMTIME st;

GetSystemTime(&st);
SystemTimeToFileTime(&st, &start);
    // Do some processing here....
GetSystemTime(&st);
SystemTimeToFileTime(&st, &end);
ULARGE_INTEGER time_start = *(ULARGE_INTEGER*)&start;
ULARGE_INTEGER time_end   = *(ULARGE_INTEGER*)&end;

__int64 i64time_start    = *(__int64 *)&time_start;
__int64 i64time_end      = *(__int64 *)&time_end;
__int64 i64time_diff_ns  = i64time_end - i64time_start; // in 100 nano seconds
__int64 i64time_diff_ms  = i64time_diff_ns / 10 / 1000; // in milli seconds
__int64 i64time_diff_sec = i64time_diff_ms / 1000;      // in seconds

char strdest_diff_ms[32];
char strdest_diff_sec[32];
_i64toa(i64time_diff_sec, strdest_diff_sec, 10);
_i64toa(i64time_diff_ms - i64time_diff_sec * 1000, strdest_diff_ms, 10);
char buffer[200];
char msg[] = "Time difference is %s.%s second(s).";
sprintf(buffer, msg, strdest_diff_sec, strdest_diff_ms);
::MessageBox(NULL, buffer, "Time Run Results", MB_ICONASTERISK |
               MB_ICONINFORMATION);




- Nick Parker
My Blog | My Articles

GeneralRe: Getting Time (milliseconds)m of Seconds Pin
James R. Twine18-Jun-04 11:37
James R. Twine18-Jun-04 11:37 
GeneralRe: Getting Time (milliseconds)m of Seconds Pin
Grahamfff19-Jun-04 10:51
Grahamfff19-Jun-04 10:51 
GeneralRe: Getting Time (milliseconds)m of Seconds Pin
James R. Twine18-Jun-04 11:35
James R. Twine18-Jun-04 11:35 
GeneralRe: Getting Time (milliseconds)m of Seconds Pin
J.B.19-Jun-04 5:01
J.B.19-Jun-04 5:01 
GeneralProper way to include header files Pin
georgiek5018-Jun-04 9:51
georgiek5018-Jun-04 9:51 
GeneralRe: Proper way to include header files Pin
Johnny ²18-Jun-04 10:33
Johnny ²18-Jun-04 10:33 
GeneralRe: Proper way to include header files Pin
georgiek5018-Jun-04 18:19
georgiek5018-Jun-04 18:19 
GeneralRe: Proper way to include header files Pin
James R. Twine18-Jun-04 11:42
James R. Twine18-Jun-04 11:42 
GeneralRe: Proper way to include header files Pin
Weiye Chen18-Jun-04 15:59
Weiye Chen18-Jun-04 15:59 
GeneralScript Hosting advice Pin
wcmcgr18-Jun-04 9:26
wcmcgr18-Jun-04 9:26 
GeneralRe: Script Hosting advice Pin
Michael P Butler19-Jun-04 2:38
Michael P Butler19-Jun-04 2:38 
GeneralVC++ 6.0 developer neaded Pin
Irek Zielinski18-Jun-04 8:54
Irek Zielinski18-Jun-04 8:54 
GeneralRe: VC++ 6.0 developer neaded Pin
gamitech18-Jun-04 9:08
gamitech18-Jun-04 9:08 
GeneralRe: VC++ 6.0 developer neaded Pin
Irek Zielinski18-Jun-04 9:11
Irek Zielinski18-Jun-04 9:11 
GeneralExplorer Selected File - how to retrieve from ToolBar (ToolBand) Pin
sas222218-Jun-04 8:53
sas222218-Jun-04 8:53 
GeneralRe: Explorer Selected File - how to retrieve from ToolBar (ToolBand) Pin
grigri21-Jun-04 2:43
grigri21-Jun-04 2:43 
GeneralRe: Explorer Selected File - how to retrieve from ToolBar (ToolBand) Pin
sas222221-Jun-04 5:26
sas222221-Jun-04 5:26 

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.