All pastes #838098 Raw Edit

clock_test.c

public text v1 · immutable
#838098 ·published 2007-12-30 03:12 UTC
rendered paste body
#include <stdio.h>
#include <time.h>
#include <math.h>

int main(void)
{
    clock_t before, after;

    before = clock();
    while ((after = clock()) == before) {
        double d = sin(time(NULL));
    }
    printf("before = %f\n", (double)before);
    printf("after  = %f\n", (double)after);
    printf("CLOCKS_PER_SEC = %f\n", (double)CLOCKS_PER_SEC);
    return 0;
}