Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
times(2)		      System Calls Manual		      times(2)

NAME
       times - get process and child process times

SYNOPSIS
DESCRIPTION
       fills  the structure pointed to by buffer with time-accounting informa-
       tion.  The structure defined in is as follows:

	      struct tms {
		  clock_t     tms_utime;      /* user time */
		  clock_t     tms_stime;      /* system	time */"
		  clock_t     tms_cutime;     /* user time, children */
		  clock_t     tms_cstime;     /* system	time, children */
	      };

       This information	comes from the calling process and each	of its	termi-
       nated  child  processes for which it has	executed a or The times	are in
       units of	1/seconds, where is processor dependent	The value  of  can  be
       queried using the function (see sysconf(2)).

       is  the CPU time	used while executing instructions in the user space of
       the calling process.

       is the CPU time used by the system on behalf of the calling process.

       is the sum of the and of	the child processes.

       is the sum of the and of	the child processes.

RETURN VALUE
       Upon successful completion, returns the elapsed real time, in units  of
       1/of  a	second,	 since	an arbitrary point in the past (such as	system
       start-up	time).	This point does	not change from	one invocation	of  to
       another.	 If fails, -1 is returned and is set to	indicate the error.

   Remarks
       has  a granularity of one tick.	Processes which	run less than one tick
       may not register	any value.

ERRORS
       [EFAULT]	      fails if buffer points to	an illegal address.  The reli-
		      able  detection  of  this	error is implementation	depen-
		      dent.

SEE ALSO
       time(1),	 gettimeofday(2),  exec(2),  fork(2),	sysconf(2),   time(2),
       wait(2).

WARNINGS
       Not  all	 CPU  time  expended  by  system processes on behalf of	a user
       process is counted in the system	CPU time for that process.

STANDARDS CONFORMANCE
								      times(2)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | SEE ALSO | WARNINGS | STANDARDS CONFORMANCE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=times&sektion=2&manpath=HP-UX+11.22>

home | help