Attachment "411603.patch" to
ticket [411773ffff]
added by
hobbs
2001-03-28 07:16:53.
Index: unix/tclUnixThrd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixThrd.c,v
retrieving revision 1.13
diff -b -c -r1.13 tclUnixThrd.c
*** unix/tclUnixThrd.c 2000/05/02 22:02:37 1.13
--- unix/tclUnixThrd.c 2001/03/28 00:15:02
***************
*** 681,688 ****
if (timePtr == NULL) {
pthread_cond_wait(pcondPtr, pmutexPtr);
} else {
! ptime.tv_sec = timePtr->sec + TclpGetSeconds();
! ptime.tv_nsec = 1000 * timePtr->usec;
pthread_cond_timedwait(pcondPtr, pmutexPtr, &ptime);
}
}
--- 681,697 ----
if (timePtr == NULL) {
pthread_cond_wait(pcondPtr, pmutexPtr);
} else {
! Tcl_Time now;
!
! /*
! * Make sure to take into account the microsecond component of the
! * current time, including possible overflow situations.
! */
!
! TclpGetTime(&now);
! ptime.tv_sec = timePtr->sec + now.sec +
! (timePtr->usec + now.usec) / 1000000;
! ptime.tv_nsec = 1000 * ((timePtr->usec + now.usec) % 1000000);
pthread_cond_timedwait(pcondPtr, pmutexPtr, &ptime);
}
}