Returns the number of hundredths of seconds since the NLM ™ application began executing

Local Servers:nonblocking
Remote Servers:N/A
Service:Time/Date Manipulation


  #include <time.h> 
  clock_t clock  (void);

Return Values

Returns the number of hundredths of seconds encoded into type clock_t.


It is often important to run benchmarks or measure the time it takes for a process to execute. The following example shows how to call clock to time a process down to 1/100 of a second. In the example, assume that CLK_TCK is a constant equal to 100.

asctime_r requires the user to pass storage for the function result, rather than relying on a global variable for the result as in asctime.

See Also