Changeset 7f9d97f3 in mainline for uspace/app


Ignore:
Timestamp:
2015-03-14T21:48:01Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
270bf4f
Parents:
c0c38c7c
Message:

Make gettimeofday() return the actual microseconds.

Enhance struct tm to also have a field to hold microseconds and make
sure that this information propagates from the RTC driver.

Location:
uspace/app
Files:
6 edited

Legend:

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

    rc0c38c7c r7f9d97f3  
    233233        getuptime(&cur);
    234234       
    235         plan_frame_timer(tv_sub(&cur, &prev));
     235        plan_frame_timer(tv_sub_diff(&cur, &prev));
    236236}
    237237
  • uspace/app/nettest1/nettest1.c

    rc0c38c7c r7f9d97f3  
    412412        gettimeofday(&time_after, NULL);
    413413       
    414         printf("Tested in %ld microseconds\n", tv_sub(&time_after,
     414        printf("Tested in %ld microseconds\n", tv_sub_diff(&time_after,
    415415            &time_before));
    416416       
  • uspace/app/nettest2/nettest2.c

    rc0c38c7c r7f9d97f3  
    370370       
    371371        printf("sendto + recvfrom tested in %ld microseconds\n",
    372             tv_sub(&time_after, &time_before));
     372            tv_sub_diff(&time_after, &time_before));
    373373       
    374374        gettimeofday(&time_before, NULL);
     
    390390       
    391391        printf("sendto, recvfrom tested in %ld microseconds\n",
    392             tv_sub(&time_after, &time_before));
     392            tv_sub_diff(&time_after, &time_before));
    393393       
    394394        rc = sockets_close(verbose, socket_ids, sockets);
  • uspace/app/rcubench/rcubench.c

    rc0c38c7c r7f9d97f3  
    264264       
    265265        getuptime(&end);
    266         int64_t duration = tv_sub(&end, &start);
     266        int64_t duration = tv_sub_diff(&end, &start);
    267267       
    268268        uint64_t secs = (uint64_t)duration / 1000 / 1000;
  • uspace/app/tester/ipc/ping_pong.c

    rc0c38c7c r7f9d97f3  
    5050                gettimeofday(&now, NULL);
    5151               
    52                 if (tv_sub(&now, &start) >= DURATION_SECS * 1000000L)
     52                if (tv_sub_diff(&now, &start) >= DURATION_SECS * 1000000L)
    5353                        break;
    5454               
  • uspace/app/tester/ipc/starve.c

    rc0c38c7c r7f9d97f3  
    5252                gettimeofday(&now, NULL);
    5353               
    54                 if (tv_sub(&now, &start) >= DURATION_SECS * 1000000L)
     54                if (tv_sub_diff(&now, &start) >= DURATION_SECS * 1000000L)
    5555                        break;
    5656               
Note: See TracChangeset for help on using the changeset viewer.