Ticket #1776: microtime_fix.diff

File microtime_fix.diff, 775 bytes (added by Bo Hansen, on May 25, 2011 at 7:14:40 AM)

Fix for microtime() for SO_TIMESTAMP

  • cpukit/libnetworking/rtems/rtems_glue.c

    ---
     cpukit/libnetworking/rtems/rtems_glue.c |    6 +-----
     1 file changed, 1 insertion(+), 5 deletions(-)
    
    old new  
    676676void
    677677microtime (struct timeval *t)
    678678{
    679         rtems_interval now;
    680 
    681         now = rtems_clock_get_ticks_since_boot();
    682         t->tv_sec = now / rtems_bsdnet_ticks_per_second;
    683         t->tv_usec = (now % rtems_bsdnet_ticks_per_second) * rtems_bsdnet_microseconds_per_tick;
     679   rtems_clock_get_tod_timeval(t);
    684680}
    685681
    686682unsigned long