Show
Ignore:
Timestamp:
07/18/07 20:52:55 (18 months ago)
Author:
aturner
Message:

commit work in progress. this doesn't seem to actually work though. :(
Anyways, this just commits my work up to this point, but at some point it's
going to need to be reworked. refs #41

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • features/performance/src/send_packets.c

    r1874 r1880  
    326326    static u_int32_t send = 0;      /* remember # of packets to send btw calls */ 
    327327    u_int32_t loop; 
     328    u_int64_t loop2; 
    328329 
    329330    /* just return if topspeed */ 
     
    447448    } 
    448449 
    449     if (!accurate) { 
     450 
     451    if (accurate == 2) { 
     452        loop2 = rdtsc_sleep(nap); 
     453        //fprintf(stderr, "rdtsc slept for %llu clicks\n", loop2); 
     454        dbgx(3, "rdtsc slept for  %llu times", loop); 
     455    } else if (accurate == 1) {  
     456        /* gettimeofday() loop */ 
     457        timeradd(&now, &nap, &delta); 
     458        loop = sleep_loop(delta); 
     459        dbgx(3, "sleep_loop looped %u times", loop);     
     460    } else { 
    450461        timeradd(&didsleep, &nap, &didsleep); 
    451462 
     
    465476            } 
    466477        } 
    467     } else { 
    468         timeradd(&now, &nap, &delta); 
    469         loop = sleep_loop(delta); 
    470         dbgx(3, "sleep_loop looped %u times", loop); 
    471478    } 
    472479#ifdef DEBUG