Commit | Line | Data |
---|---|---|
af9bf3ab KB |
1 | .\" Copyright (c) 1989 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms are permitted | |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
16 | .\" @(#)time.3 5.1 (Berkeley) %G% | |
17 | .\" | |
18 | .TH TIME 3 "" | |
19 | .UC 4 | |
20 | .SH NAME | |
21 | time \- get time of day | |
22 | .SH SYNOPSIS | |
23 | .nf | |
24 | .B #include <sys/types.h> | |
25 | ||
26 | .B time_t time(tloc) | |
27 | .B time_t *tloc; | |
28 | .fi | |
29 | .SH DESCRIPTION | |
30 | .PP | |
31 | .I Time | |
32 | returns the value of time in seconds since 0 hours, 0 minutes, | |
33 | 0 seconds, January 1, 1970, Coordinated Universal Time. | |
34 | .PP | |
35 | The argument | |
36 | .I tloc | |
37 | points to an area where the return value is also stored. | |
38 | If | |
39 | .I tloc | |
40 | is a NULL pointer, no value is stored. | |
41 | .PP | |
42 | Upon successful completion, | |
43 | .IR time () | |
44 | returns the value of time. | |
45 | Otherwise a value of ((\fItime_t\fR) -1) | |
46 | is returned and | |
47 | .I errno | |
48 | is set to indicate the error. | |
49 | .SH "ERRORS | |
50 | The following error codes may be set in | |
51 | .IR errno : | |
52 | .TP 15 | |
53 | [EFAULT] | |
54 | An argument address referenced invalid memory. | |
55 | .SH "SEE ALSO" | |
56 | gettimeofday(2), ctime(3) |