APUE course source code
guowenxue
3 hours ago 805b28fc2e633bcd9c823a4b23614378ebfd50a1
project/2.socketd/booster/packet.c
@@ -34,13 +34,15 @@
int get_time(struct tm *ptm)
{
    time_t          now;
    if( !ptm )
    {
        log_error("Invalid input arugments\n");
        return -1;
    }
    time_t now = time(NULL);
    now = time(NULL);
    localtime_r(&now, ptm);
    return 0;