diff options
Diffstat (limited to 'static/freebsd/man3/rtime.3')
| -rw-r--r-- | static/freebsd/man3/rtime.3 | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/static/freebsd/man3/rtime.3 b/static/freebsd/man3/rtime.3 new file mode 100644 index 00000000..3c245ab3 --- /dev/null +++ b/static/freebsd/man3/rtime.3 @@ -0,0 +1,46 @@ +.\" +.Dd May 13, 2021 +.Dt RTIME 3 +.Os +.Sh NAME +.Nm rtime +.Nd "get remote time" +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/types.h +.In sys/time.h +.In netinet/in.h +.Ft int +.Fo rtime +.Fa "struct sockaddr_in *addrp" +.Fa "struct timeval *timep" +.Fa "struct timeval *timeout" +.Fc +.Sh DESCRIPTION +The +.Fn rtime +function +consults the Internet Time Server at the address pointed to by +.Fa addrp +and returns the remote time in the +.Vt timeval +struct pointed to by +.Fa timep . +Normally, the +.Tn UDP +protocol is used when consulting the Time Server. +The +.Fa timeout +argument specifies how long the +routine should wait before giving +up when waiting for a reply. +If +.Fa timeout +is specified as +.Dv NULL , +however, the routine will instead use +.Tn TCP +and block until a reply is received from the time server. +.Sh RETURN VALUES +.Rv -std rtime |
