Changeset 10306


Ignore:
Timestamp:
Mar 6, 2010, 8:15:23 PM (13 years ago)
Author:
charles
Message:

(trunk libT) poke at the newfound 100% cpu bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/web.c

    r10304 r10306  
    288288        if( msec > 0 )
    289289        {
     290            int usec;
    290291            int max_fd;
    291292            struct timeval t;
     
    300301            if( msec > THREADFUNC_MAX_SLEEP_MSEC )
    301302                msec = THREADFUNC_MAX_SLEEP_MSEC;
    302             t.tv_sec = 0;
    303             t.tv_usec = msec * 1000;
     303
     304            usec = msec * 1000;
     305            t.tv_sec =  usec / 1000000;
     306            t.tv_usec = usec % 1000000;
    304307
    305308            select( max_fd+1, &r_fd_set, &w_fd_set, &c_fd_set, &t );
Note: See TracChangeset for help on using the changeset viewer.