Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | macosx: Tcl_Sleep -> TclpUSleep (provides microseconds sleep, fixed unresolved external "TclpUSleep" bug). |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | sebres-8-5-event-perf-branch |
Files: | files | file ages | folders |
SHA3-256: |
f26dfbb645ecaedcbbd09a597161e841 |
User & Date: | sebres 2019-03-09 19:07:38.694 |
Context
2019-03-09
| ||
20:07 | non-native time scale fixed: do scale time only once (not in cycle, since all other times used in ca... check-in: f20b5264a3 user: sebres tags: sebres-8-5-event-perf-branch | |
19:07 | macosx: Tcl_Sleep -> TclpUSleep (provides microseconds sleep, fixed unresolved external "TclpUSleep"... check-in: f26dfbb645 user: sebres tags: sebres-8-5-event-perf-branch | |
18:41 | TclpScaleUTime fixed typo, only if native scaling used (tclScaleTimeProcPtr == NativeScaleTime) the ... check-in: fca5fb3444 user: sebres tags: sebres-8-5-event-perf-branch | |
Changes
Changes to macosx/tclMacOSXNotify.c.
︙ | ︙ | |||
1447 1448 1449 1450 1451 1452 1453 | return changeWaitingList; } /* *---------------------------------------------------------------------- * | | | | | < | | | < < < < | | 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 | return changeWaitingList; } /* *---------------------------------------------------------------------- * * TclpUSleep -- * * Delay execution for the specified time (in microseconds). * * Results: * None. * * Side effects: * Time passes. * *---------------------------------------------------------------------- */ void TclpUSleep( Tcl_WideInt usec) /* Time to sleep. */ { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); if (usec <= 0) { /* force one context switch */ usec = 0; } /* * TIP #233: Scale from virtual time to real-time. */ TclpScaleUTime(&usec); if (tsdPtr->runLoop) { CFTimeInterval waitTime; CFRunLoopTimerRef runLoopTimer = tsdPtr->runLoopTimer; CFAbsoluteTime nextTimerFire = 0, waitEnd, now; SInt32 runLoopStatus; waitTime = (usec / 1000000) + 1.0e-6 * (usec % 1000000); now = CFAbsoluteTimeGetCurrent(); waitEnd = now + waitTime; if (runLoopTimer) { nextTimerFire = CFRunLoopTimerGetNextFireDate(runLoopTimer); if (nextTimerFire < waitEnd) { CFRunLoopTimerSetNextFireDate(runLoopTimer, now + |
︙ | ︙ | |||
1523 1524 1525 1526 1527 1528 1529 | tsdPtr->sleeping = 0; if (runLoopTimer) { CFRunLoopTimerSetNextFireDate(runLoopTimer, nextTimerFire); } } else { struct timespec waitTime; | | | | 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 | tsdPtr->sleeping = 0; if (runLoopTimer) { CFRunLoopTimerSetNextFireDate(runLoopTimer, nextTimerFire); } } else { struct timespec waitTime; waitTime.tv_sec = (usec / 1000000); waitTime.tv_nsec = (usec % 1000000) * 1000; while (nanosleep(&waitTime, &waitTime)); } } /* *---------------------------------------------------------------------- * |
︙ | ︙ |