Module Name: src Committed By: jruoho Date: Tue May 18 07:14:18 UTC 2010
Modified Files: src/lib/libc/sys: gettimeofday.2 Log Message: Refer to timeval(3) and only describe the legacy struct timezone here. Improve markup. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/lib/libc/sys/gettimeofday.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/sys/gettimeofday.2 diff -u src/lib/libc/sys/gettimeofday.2:1.26 src/lib/libc/sys/gettimeofday.2:1.27 --- src/lib/libc/sys/gettimeofday.2:1.26 Fri Jan 16 10:52:07 2009 +++ src/lib/libc/sys/gettimeofday.2 Tue May 18 07:14:18 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: gettimeofday.2,v 1.26 2009/01/16 10:52:07 drochner Exp $ +.\" $NetBSD: gettimeofday.2,v 1.27 2010/05/18 07:14:18 jruoho Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)gettimeofday.2 8.2 (Berkeley) 5/26/95 .\" -.Dd January 16, 2009 +.Dd May 18, 2010 .Dt GETTIMEOFDAY 2 .Os .Sh NAME @@ -60,7 +60,9 @@ The time is expressed in seconds and microseconds since midnight (0 hour), January 1, 1970. The resolution of the system clock is hardware dependent, -and the time may be updated continuously or in ``ticks.'' +and the time may be updated continuously or in +.Dq ticks . +.Pp If .Fa tp is NULL, the time will not be returned or set. @@ -76,15 +78,11 @@ and .Fa tzp are defined in -.Ao Pa sys/time.h Ac -as: -.Pp -.Bd -literal -struct timeval { - time_t tv_sec; /* seconds since Jan. 1, 1970 */ - suseconds_t tv_usec; /* and microseconds */ -}; - +.In sys/time.h . +The first one is described in +.Xr timeval 3 +and the latter legacy structure is defined as: +.Bd -literal -offset indent struct timezone { int tz_minuteswest; /* of Greenwich */ int tz_dsttime; /* type of dst correction to apply */ @@ -123,8 +121,8 @@ .\" .Xr adjtime 2 .\" system call even when the system is secure. .Sh RETURN VALUES -A 0 return value indicates that the call succeeded. -A \-1 return value indicates an error occurred, and in this +A return value 0 indicates that the call succeeded. +A return value \-1 indicates an error occurred, and in this case an error code is stored into the global variable .Va errno . .Sh ERRORS