Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the time is "start/10e3" but not "start/1e3"? #9

Open
csyking opened this issue Jul 13, 2017 · 1 comment
Open

Why the time is "start/10e3" but not "start/1e3"? #9

csyking opened this issue Jul 13, 2017 · 1 comment

Comments

@csyking
Copy link

csyking commented Jul 13, 2017

Your code is:
clock_t start; start = clock(); find.findFace(image); imshow("result", image); imwrite("result.jpg",image); start = clock() -start; cout<<"time is "<<start/10e3<<endl;
Why you compute the time of "ms" with "start/10e3"? i. e. How to compute the time of "ms" with C++? I think it is right with "start/1e3".

looking forward for your reply.

best.

@horse007666
Copy link

The right answer is:
cout<<"time is "<<(double)start/CLOCKS_PER_SEC*1000<<" ms "<<endl;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants