Changeset 94eb1bb in rtems


Ignore:
Timestamp:
Nov 16, 2012, 1:16:03 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
3fbcadf
Parents:
90733a86
git-author:
Sebastian Huber <sebastian.huber@…> (11/16/12 13:16:03)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/21/12 15:29:41)
Message:

libnetworking: Use rtems_clock_get_uptime_timeval

Location:
cpukit/libnetworking/rtems
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/rtems/rtems_bsdnet_internal.h

    r90733a86 r94eb1bb  
    6262#define suser(a,b)      0
    6363
    64 void    microtime (struct timeval *tv);
     64static inline void microtime(struct timeval *tv)
     65{
     66  rtems_clock_get_uptime_timeval(tv);
     67}
     68
    6569#define hz rtems_bsdnet_ticks_per_second
    6670#define tick rtems_bsdnet_microseconds_per_tick
  • cpukit/libnetworking/rtems/rtems_glue.c

    r90733a86 r94eb1bb  
    713713        rtems_bsdnet_semaphore_obtain ();
    714714        return sc;
    715 }
    716 
    717 /*
    718  * Return time since startup
    719  */
    720 void
    721 microtime (struct timeval *t)
    722 {
    723         rtems_interval now;
    724 
    725         now = rtems_clock_get_ticks_since_boot();
    726         t->tv_sec = now / rtems_bsdnet_ticks_per_second;
    727         t->tv_usec = (now % rtems_bsdnet_ticks_per_second) * rtems_bsdnet_microseconds_per_tick;
    728715}
    729716
Note: See TracChangeset for help on using the changeset viewer.