Created
August 31, 2016 01:57
-
-
Save hsienwei/cfd1bda7a51d336670ec1b2bb9cf72cb to your computer and use it in GitHub Desktop.
在c++中顯示執行ms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clock_t t1, t2; | |
t1 = clock(); | |
DoSomething(); | |
t2 = clock(); | |
float diff = ((float)(t2 - t1) / 1000000.0F) * 1000; | |
printf("battle total time : %f \n ", diff); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment