Changeset 1ab8539 in mainline for uspace/app/nettest2/nettest2.c


Ignore:
Timestamp:
2014-11-14T19:16:23Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5042706
Parents:
9696b01
Message:

remove system.uptime sysinfo entry since it is redundant
cleanup the time handling routines

  • still more cleanup is needed here, the code is a wild combination of quasi-POSIX API (with all the brain-dead types, etc.) and HelenOS API
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/nettest2/nettest2.c

    r9696b01 r1ab8539  
    356356       
    357357        struct timeval time_before;
    358         rc = gettimeofday(&time_before, NULL);
    359         if (rc != EOK) {
    360                 fprintf(stderr, "Get time of day error %d\n", rc);
    361                 return rc;
    362         }
     358        gettimeofday(&time_before, NULL);
    363359       
    364360        rc = sockets_sendto_recvfrom(verbose, socket_ids, sockets, address,
     
    368364       
    369365        struct timeval time_after;
    370         rc = gettimeofday(&time_after, NULL);
    371         if (rc != EOK) {
    372                 fprintf(stderr, "Get time of day error %d\n", rc);
    373                 return rc;
    374         }
     366        gettimeofday(&time_after, NULL);
    375367       
    376368        if (verbose)
     
    380372            tv_sub(&time_after, &time_before));
    381373       
    382         rc = gettimeofday(&time_before, NULL);
    383         if (rc != EOK) {
    384                 fprintf(stderr, "Get time of day error %d\n", rc);
    385                 return rc;
    386         }
     374        gettimeofday(&time_before, NULL);
    387375       
    388376        rc = sockets_sendto(verbose, socket_ids, sockets, address, addrlen,
     
    396384                return rc;
    397385       
    398         rc = gettimeofday(&time_after, NULL);
    399         if (rc != EOK) {
    400                 fprintf(stderr, "Get time of day error %d\n", rc);
    401                 return rc;
    402         }
     386        gettimeofday(&time_after, NULL);
    403387       
    404388        if (verbose)
Note: See TracChangeset for help on using the changeset viewer.