Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

cputime - CPU time used by the current task

&pagelevel(4)&pagelevel

Definition

#include <stdlib.h>

int cputime(void);

cputime returns the CPU time used by the current task (since LOGON).

Return val.

Integer indicating the CPU time consumed in ten thousandths of a second.

Example

#include <stdio.h>
#include <stdlib.h>
int main(void)
{
  float time_f;
  time_f = (float)cputime() / 10000;
  printf("cputime since logon: %f seconds\n", time_f);
  return 0;
}