#include <time.h>
방법1 | 방법2 | |
Start timing | Start=clock(); | Start=time(NULL); |
Stop timing | Stop=clock(); | Stop=time(NULL); |
Type returned | Clock_t | Time_t |
Result in seconds | Duration = ((double)(stop-start))/CLOCKS_PER_SEC; |
Duration = (double) difftime(stop, start); |