{
    "mode": "man",
    "parameter": "rtime",
    "section": "3t",
    "url": "https://www.chedong.com/phpMan.php/man/rtime/3t/json",
    "generated": "2026-05-30T06:06:44Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "rtime — get remote time\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "#include <sys/types.h>",
                    "content": ""
                },
                {
                    "name": "#include <sys/time.h>",
                    "content": ""
                },
                {
                    "name": "#include <netinet/in.h>",
                    "content": "int\nrtime(struct sockaddrin *addrp, struct timeval *timep, struct timeval *timeout);\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The rtime() function consults the Internet Time Server at the address pointed to by addrp and\nreturns the remote time in the timeval struct pointed to by timep.  Normally, the UDP protocol\nis used when consulting the Time Server.  The timeout argument specifies how long the routine\nshould wait before giving up when waiting for a reply.  If timeout is specified as NULL, how‐\never, the routine will instead use TCP and block until a reply is received from the time\nserver.\n",
            "subsections": []
        },
        "RETURN VALUES": {
            "content": "The rtime() function returns the value 0 if successful; otherwise the value -1 is returned and\nthe global variable errno is set to indicate the error.\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "The rtime() function is part of libtirpc.\n\nBSD                            November 22, 1987                           BSD",
            "subsections": []
        }
    },
    "summary": "rtime — get remote time",
    "flags": [],
    "examples": [],
    "see_also": []
}