1
0

patch-unix_tclUnixTime_c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --- tcl8.5.8.orig/unix/tclUnixTime.c 2008-04-14 19:49:59.000000000 +0200
  2. +++ tcl8.5.8/unix/tclUnixTime.c 2011-01-13 15:59:00.000000000 +0100
  3. @@ -164,12 +164,6 @@ TclpGetWideClicks(void)
  4. (*tclGetTimeProcPtr) (&time, tclTimeClientData);
  5. now = (Tcl_WideInt) (time.sec*1000000 + time.usec);
  6. - } else {
  7. -#ifdef MAC_OSX_TCL
  8. - now = (Tcl_WideInt) (mach_absolute_time() & INT64_MAX);
  9. -#else
  10. -#error Wide high-resolution clicks not implemented on this platform
  11. -#endif
  12. }
  13. return now;
  14. @@ -200,23 +194,6 @@ TclpWideClicksToNanoseconds(
  15. if (tclGetTimeProcPtr != NativeGetTime) {
  16. nsec = clicks * 1000;
  17. - } else {
  18. -#ifdef MAC_OSX_TCL
  19. - static mach_timebase_info_data_t tb;
  20. - static uint64_t maxClicksForUInt64;
  21. -
  22. - if (!tb.denom) {
  23. - mach_timebase_info(&tb);
  24. - maxClicksForUInt64 = UINT64_MAX / tb.numer;
  25. - }
  26. - if ((uint64_t) clicks < maxClicksForUInt64) {
  27. - nsec = ((uint64_t) clicks) * tb.numer / tb.denom;
  28. - } else {
  29. - nsec = ((long double) (uint64_t) clicks) * tb.numer / tb.denom;
  30. - }
  31. -#else
  32. -#error Wide high-resolution clicks not implemented on this platform
  33. -#endif
  34. }
  35. return nsec;