Commit | Line | Data |
---|---|---|
af9bf3ab KB |
1 | .\" Copyright (c) 1989 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
91cff1e1 | 4 | .\" %sccs.include.redist.man% |
af9bf3ab | 5 | .\" |
91cff1e1 | 6 | .\" @(#)time.3 5.2 (Berkeley) %G% |
af9bf3ab KB |
7 | .\" |
8 | .TH TIME 3 "" | |
9 | .UC 4 | |
10 | .SH NAME | |
11 | time \- get time of day | |
12 | .SH SYNOPSIS | |
13 | .nf | |
14 | .B #include <sys/types.h> | |
15 | ||
16 | .B time_t time(tloc) | |
17 | .B time_t *tloc; | |
18 | .fi | |
19 | .SH DESCRIPTION | |
20 | .PP | |
21 | .I Time | |
22 | returns the value of time in seconds since 0 hours, 0 minutes, | |
23 | 0 seconds, January 1, 1970, Coordinated Universal Time. | |
24 | .PP | |
25 | The argument | |
26 | .I tloc | |
27 | points to an area where the return value is also stored. | |
28 | If | |
29 | .I tloc | |
30 | is a NULL pointer, no value is stored. | |
31 | .PP | |
32 | Upon successful completion, | |
33 | .IR time () | |
34 | returns the value of time. | |
35 | Otherwise a value of ((\fItime_t\fR) -1) | |
36 | is returned and | |
37 | .I errno | |
38 | is set to indicate the error. | |
39 | .SH "ERRORS | |
40 | The following error codes may be set in | |
41 | .IR errno : | |
42 | .TP 15 | |
43 | [EFAULT] | |
44 | An argument address referenced invalid memory. | |
45 | .SH "SEE ALSO" | |
46 | gettimeofday(2), ctime(3) |