1.\" @(#)rtime.3n 2.1 88/08/08 4.0 RPCSRC; from 1.5 88/02/08 SMI 2.\" $FreeBSD: src/lib/libc/rpc/rtime.3,v 1.4.2.2 2001/12/14 18:33:57 ru Exp $ 3.\" $DragonFly: src/lib/libc/rpc/rtime.3,v 1.2 2003/06/17 04:26:45 dillon Exp $ 4.\" 5.Dd November 22, 1987 6.Dt RTIME 3 7.Os 8.Sh NAME 9.Nm rtime 10.Nd "get remote time" 11.Sh LIBRARY 12.Lb libc 13.Sh SYNOPSIS 14.In sys/types.h 15.In sys/time.h 16.In netinet/in.h 17.Ft int 18.Fo rtime 19.Fa "struct sockaddr_in *addrp" 20.Fa "struct timeval *timep" 21.Fa "struct timeval *timeout" 22.Fc 23.Sh DESCRIPTION 24.Fn rtime 25consults the Internet Time Server at the address pointed to by 26.Fa addrp 27and returns the remote time in the 28.Vt timeval 29struct pointed to by 30.Fa timep . 31Normally, the 32.Tn UDP 33protocol is used when consulting the Time Server. 34The 35.Fa timeout 36parameter specifies how long the 37routine should wait before giving 38up when waiting for a reply. 39If 40.Fa timeout 41is specified as 42.Dv NULL , 43however, the routine will instead use 44.Tn TCP 45and block until a reply is received from the time server. 46.Sh RETURN VALUES 47.Rv -std rtime 48.Sh SEE ALSO 49.Xr timed 8 50