problem with simple clock() call
From: donno (yo_donno_at_outerspace.com)
Date: 09/30/04
- Previous message: Pat Ford: "Re: Utilty for parsing raw data into C structures"
- Next in thread: Kasper Dupont: "Re: problem with simple clock() call"
- Reply: Kasper Dupont: "Re: problem with simple clock() call"
- Reply: QNils_O=2E_Sel=E5sdal=22?=: "Re: problem with simple clock() call"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Sep 2004 11:38:54 GMT
Man, I'm scratching my head on this one -
I'm trying to get a simple timer function running, and
the standard API clock() is not working.
I've tried this on 2 different Linux boxes, RH9 and FC2
Here's the code
#include <iostream>
#include <time.h>
int main(int argc,char *argv[]){
double start, end;
char myin;
start = clock();
std::cout << "Press any key, then enter" << std::endl;
std::cin >> myin;
end = clock();
std::cout << "start = " << start << " end = " << end << std::endl;
return 0;
}
I just get start = 0 end = 0
wierd.
TIA,
replies to mailing list only, por favor.
Don
- Previous message: Pat Ford: "Re: Utilty for parsing raw data into C structures"
- Next in thread: Kasper Dupont: "Re: problem with simple clock() call"
- Reply: Kasper Dupont: "Re: problem with simple clock() call"
- Reply: QNils_O=2E_Sel=E5sdal=22?=: "Re: problem with simple clock() call"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|