Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COHow frequently is the wall clock time updated? I obtain very different time values between gettimeofday() and clock_gettime(CLOCK_PROCESS_CPUTIME_ID) methods. The second one seems more stable, but it's result is a larger time then the first one, instead I expected a smaller time!
      singulars
    2. COYou can tell how often the wall clock timer is updated by calling it as fast as you can in a loop and subtracting the results the first time the value changes. It varies from device to device and release to release. The PROCESS_CPUTIME clock only advances when your process does work; if it's asleep, the clock doesn't change. (I'd recommend CLOCK_THREAD_CPUTIME_ID for performance work, since it only advances when the current thread uses the CPU.) The clocks are not tied to each other, and may not start at zero.
      singulars
    3. COWhat I mean is that by measuring with clock_gettime(CLOCK_PROCESS_CPUTIME_ID) (or THREAD, same results) on a small set of operations (a few milliseconds) I get a time equal to gettimeofday() or a simple clock(). Instead, in long cycles I get a longer time with the first one, and the same, shorter, time with gettimeofday() and clock(). NOTE: in all cases I measure time between an end point and a start point, the result of clock_gettime() is corrected if nanoseconds difference < 0 (seconds++). clock() is translated dividing by CLOCKS_PER_SEC.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload