Search:

Type: Posts; User: iceaway

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    15,463

    If you read the man page I linked to, you would...

    If you read the man page I linked to, you would see that dividing the return value from clock() with CLOCKS_PER_SEC gives you the result in seconds. Hence, if you multiply (t1 - t0) by 1000 before...
  2. Replies
    11
    Views
    15,463

    Then you should probably use clock()...

    Then you should probably use clock() instead of gettimeofday().



    clock_t t0, t1, elapsed;
    t0 = clock();
    /* Call function */
    t1 = clock();
    elapsed = 1000 * (t1 - t0) / (CLOCKS_PER_SEC);...
  3. Replies
    11
    Views
    15,463

    Do you want the wall-clock time or the actual...

    Do you want the wall-clock time or the actual time that the processor is running your code?
Results 1 to 3 of 3