[D-runtime] [D-Programming-Language/druntime] 2842c8: Fix bad assumption about clock speed in MonoTime u...

GitHub via D-runtime d-runtime at puremagic.com
Sun Aug 31 05:19:27 PDT 2014


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/druntime
  Commit: 2842c8f5b3f855170e7912c508a408ef2c64b0a0
      https://github.com/D-Programming-Language/druntime/commit/2842c8f5b3f855170e7912c508a408ef2c64b0a0
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2014-08-30 (Sat, 30 Aug 2014)

  Changed paths:
    M src/core/time.d

  Log Message:
  -----------
  Fix bad assumption about clock speed in MonoTime unit tests.

This code worked just fine so long as the two subsequent calls to
MonoTime.currTime returned different results, but apparently, some
machines, CPUs are fast enough in comparison to their system clock that
that's not guaranteed, so the diff was 0 instead of at least 1, and the
test failed. And looking at it, it probably should have been >= rather
than > anyway (at least based on the variable name - min).

This should make it so that the tests stop failing on Daniel Murphy's
machine.


  Commit: 413ac165d8175b44dae118823ea69852760aa8d0
      https://github.com/D-Programming-Language/druntime/commit/413ac165d8175b44dae118823ea69852760aa8d0
  Author: Daniel Murphy <yebblies at gmail.com>
  Date:   2014-08-31 (Sun, 31 Aug 2014)

  Changed paths:
    M src/core/time.d

  Log Message:
  -----------
  Merge pull request #943 from jmdavis/time

Fix bad assumption about clock speed in MonoTime unit tests.


Compare: https://github.com/D-Programming-Language/druntime/compare/d0bba643e9a6...413ac165d817


More information about the D-runtime mailing list