Answers for "how to calculate defference in time c"

C
1

measure time in c

void timeWait (float threshold) {
    float timeInitial, timeMeasured, timeDelta = 0;

    timeInitial = (float)clock();
    while (timeDelta < threshold) {
        timeMeasured = (float)clock();
        timeDelta = ((timeMeasured - timeInitial) / (float)CLOCKS_PER_SEC);
    }
    printf("%.2f - %.2f s have passed.", threshold, timeDelta);
}
Posted by: Guest on May-14-2020

Code answers related to "how to calculate defference in time c"

Code answers related to "C"

Browse Popular Code Answers by Language