Click here to Skip to main content
14,361,357 members

C / C++ / MFC

 
AnswerRe: MFC dialog based application Pin
Richard MacCutchan10-Jul-15 5:15
protectorRichard MacCutchan10-Jul-15 5:15 
QuestionHow do I add Thread in Dll Pin
AmbiguousName9-Jul-15 23:12
memberAmbiguousName9-Jul-15 23:12 
QuestionEstimate time of execution c-function execution Pin
CodingStyle7-Jul-15 6:08
memberCodingStyle7-Jul-15 6:08 
AnswerRe: Estimate time of execution c-function execution Pin
Richard MacCutchan7-Jul-15 7:31
protectorRichard MacCutchan7-Jul-15 7:31 
AnswerRe: Estimate time of execution c-function execution Pin
Jochen Arndt7-Jul-15 7:35
mveJochen Arndt7-Jul-15 7:35 
AnswerRe: Estimate time of execution c-function execution Pin
Dr. Fry7-Jul-15 11:04
memberDr. Fry7-Jul-15 11:04 
AnswerRe: Estimate time of execution c-function execution Pin
CodingStyle8-Jul-15 1:02
memberCodingStyle8-Jul-15 1:02 
AnswerRe: Estimate time of execution c-function execution Pin
Arthur V. Ratz13-Aug-15 20:29
mvaArthur V. Ratz13-Aug-15 20:29 
This is probably what you need:
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
void test(){
    int i;int s=0;

    for(i=1; i<1000000; i++){s+=sin(i)/i;}
}

int main(void)
{
    clock_t time[2], timediff;
    float elapsed;
    time[0] = clock();
    f1();
    time[1] = clock();
    elapsed = ((float)abs(time[0] - time[1]))/CLOCKS_PER_SEC;
    printf("Code executed in %f milliseconds.\n", elapsed);
    return 0;
}

Questionpreprocessor #include Pin
Vaclav_6-Jul-15 4:12
memberVaclav_6-Jul-15 4:12 
AnswerRe: preprocessor #include Pin
Chris Losinger6-Jul-15 4:30
professionalChris Losinger6-Jul-15 4:30 
GeneralRe: preprocessor #include Pin
Albert Holguin7-Jul-15 14:29
professionalAlbert Holguin7-Jul-15 14:29 
AnswerRe: preprocessor #include Pin
Jochen Arndt6-Jul-15 5:41
mveJochen Arndt6-Jul-15 5:41 
GeneralRe: preprocessor #include Pin
PIEBALDconsult6-Jul-15 5:43
protectorPIEBALDconsult6-Jul-15 5:43 
GeneralRe: preprocessor #include Pin
Vaclav_10-Jul-15 5:07
memberVaclav_10-Jul-15 5:07 
GeneralRe: preprocessor #include Pin
Richard MacCutchan10-Jul-15 5:22
protectorRichard MacCutchan10-Jul-15 5:22 
GeneralRe: preprocessor #include Pin
Vaclav_13-Jul-15 8:50
memberVaclav_13-Jul-15 8:50 
GeneralRe: preprocessor #include Pin
Richard MacCutchan13-Jul-15 23:05
protectorRichard MacCutchan13-Jul-15 23:05 
QuestionRe: preprocessor #include Pin
David Crow10-Jul-15 6:30
memberDavid Crow10-Jul-15 6:30 
AnswerRe: preprocessor #include Pin
Vaclav_13-Jul-15 8:34
memberVaclav_13-Jul-15 8:34 
GeneralRe: preprocessor #include Pin
David Crow13-Jul-15 11:53
memberDavid Crow13-Jul-15 11:53 
QuestionWaiting for open files Pin
Drakesal4-Jul-15 1:46
memberDrakesal4-Jul-15 1:46 
AnswerRe: Waiting for open files Pin
Richard Andrew x644-Jul-15 5:58
professionalRichard Andrew x644-Jul-15 5:58 
GeneralRe: Waiting for open files Pin
Drakesal4-Jul-15 6:01
memberDrakesal4-Jul-15 6:01 
AnswerRe: Waiting for open files Pin
Richard Andrew x644-Jul-15 6:23
professionalRichard Andrew x644-Jul-15 6:23 
GeneralRe: Waiting for open files Pin
Drakesal4-Jul-15 6:33
memberDrakesal4-Jul-15 6:33 

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.