1*48352Scael.\" Copyright (c) 1989, 1991 The Regents of the University of California. 238049Sbostic.\" All rights reserved. 338049Sbostic.\" 443571Strent.\" %sccs.include.redist.man% 538049Sbostic.\" 6*48352Scael.\" @(#)time.3 5.3 (Berkeley) 04/19/91 738049Sbostic.\" 8*48352Scael.Dd 9*48352Scael.Dt TIME 3 10*48352Scael.Os BSD 4 11*48352Scael.Sh NAME 12*48352Scael.Nm time 13*48352Scael.Nd get time of day 14*48352Scael.Sh SYNOPSIS 15*48352Scael.Fd #include <sys/types.h> 16*48352Scael.Ft time_t 17*48352Scael.Fn time "time_t *tloc" 18*48352Scael.Sh DESCRIPTION 19*48352ScaelThe 20*48352Scael.Fn time 21*48352Scaelfunction 2238049Sbosticreturns the value of time in seconds since 0 hours, 0 minutes, 2338049Sbostic0 seconds, January 1, 1970, Coordinated Universal Time. 24*48352Scael.Pp 25*48352ScaelA copy of the time value may be saved to the area indicated by the 26*48352Scaelpointer 27*48352Scael.Fa tloc . 2838049SbosticIf 29*48352Scael.Fa tloc 3038049Sbosticis a NULL pointer, no value is stored. 31*48352Scael.Pp 3238049SbosticUpon successful completion, 33*48352Scael.Fn time 3438049Sbosticreturns the value of time. 35*48352ScaelOtherwise a value of 36*48352Scael.Po 37*48352Scael.Po Fa time_t Pc \-1 38*48352Scael.Pc 39*48352Scaelis returned and the global variable 40*48352Scael.Va errno 4138049Sbosticis set to indicate the error. 42*48352Scael.Sh ERRORS 4338049SbosticThe following error codes may be set in 44*48352Scael.Va errno : 45*48352Scael.Bl -tag -width [EFAULT] 46*48352Scael.It Bq Er EFAULT 4738049SbosticAn argument address referenced invalid memory. 48*48352Scael.Sh SEE ALSO 49*48352Scael.Xr gettimeofday 2 , 50*48352Scael.Xr ctime 3 51*48352Scael.Sh HISTORY 52*48352ScaelA 53*48352Scael.Fn time 54*48352Scaelfunction appeared in 55*48352Scael.At v6 . 56