version 1.2, 1993/07/30 08:39:51 |
version 1.9, 1999/03/22 19:44:47 |
|
|
.\" Copyright (c) 1990, 1991 The Regents of the University of California. |
.\" $NetBSD$ |
.\" All rights reserved. |
.\" |
|
.\" Copyright (c) 1990, 1991, 1993 |
|
.\" The Regents of the University of California. All rights reserved. |
.\" |
.\" |
.\" Redistribution and use in source and binary forms, with or without |
.\" Redistribution and use in source and binary forms, with or without |
.\" modification, are permitted provided that the following conditions |
.\" modification, are permitted provided that the following conditions |
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
.\" SUCH DAMAGE. |
.\" SUCH DAMAGE. |
.\" |
.\" |
.\" from: @(#)times.3 6.4 (Berkeley) 4/19/91 |
.\" @(#)times.3 8.1 (Berkeley) 6/4/93 |
.\" $Id$ |
|
.\" |
.\" |
.Dd April 19, 1991 |
.Dd June 4, 1993 |
.Dt TIMES 3 |
.Dt TIMES 3 |
.Os BSD 4 |
.Os |
.Sh NAME |
.Sh NAME |
.Nm times |
.Nm times |
.Nd process times |
.Nd process times |
|
.Sh LIBRARY |
|
.Lb libc |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Fd #include <sys/times.h> |
.Fd #include <sys/times.h> |
.Ft clock_t |
.Ft clock_t |
.Fn times "struct tms *tp" |
.Fn times "struct tms *tp" |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Bf -symbolic |
.Bf -symbolic |
This interface is obsoleted by getrusage(2) |
This interface is obsoleted by |
and gettimeofday(3). |
.Xr getrusage 2 |
|
and |
|
.Xr gettimeofday 2 . |
.Ef |
.Ef |
.Pp |
.Pp |
The |
The |
Line 54 function returns the value of time in |
|
Line 59 function returns the value of time in |
|
.Dv CLK_TCK Ns 's |
.Dv CLK_TCK Ns 's |
of a second since |
of a second since |
0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal |
0 hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal |
Time. |
Time (UTC). |
.Pp |
.Pp |
It also fills in the structure pointed to by |
It also fills in the structure pointed to by |
.Fa tp |
.Fa tp |
Line 112 If an error occurs, |
|
Line 117 If an error occurs, |
|
.Fn times |
.Fn times |
returns the value |
returns the value |
.Pq (clock_t)\-1 , |
.Pq (clock_t)\-1 , |
and sets errno to indicate the error. |
and sets |
|
.Va errno |
|
to indicate the error. |
.Sh ERRORS |
.Sh ERRORS |
The |
The |
.Fn times |
.Fn times |
|
|
.Sh STANDARDS |
.Sh STANDARDS |
The |
The |
.Fn times |
.Fn times |
function |
function conforms to |
conforms to |
.St -p1003.1-90 . |
.St -p1003.1-88 . |
|