Thread overview
[D-runtime] [D-Programming-Language/druntime] d7ab02: Add an OS variable to posix.mak and disable core/t...
Feb 20, 2011
Jonathan M Davis
Feb 20, 2011
Brad Roberts
Feb 21, 2011
Brad Roberts
February 20, 2011
Branch: refs/heads/master
Home:   https://github.com/D-Programming-Language/druntime

Commit: d7ab02b7be3e172352855daa05edd5ce4ddf9e43
    https://github.com/D-Programming-Language/druntime/commit/d7ab02b7be3e172352855daa05edd5ce4ddf9e43
Author: Brad Roberts <braddr at puremagic.com>
Date:   2011-02-19 (Sat, 19 Feb 2011)

Changed paths:
  M posix.mak

Log Message:
-----------
Add an OS variable to posix.mak and disable core/time on freebsd until it can be fixed


February 20, 2011
On Sunday 20 February 2011 01:39:50 noreply at github.com wrote:
> Branch: refs/heads/master
> Home:   https://github.com/D-Programming-Language/druntime
> 
> Commit: d7ab02b7be3e172352855daa05edd5ce4ddf9e43
> 
> https://github.com/D-Programming-Language/druntime/commit/d7ab02b7be3e1723
> 52855daa05edd5ce4ddf9e43 Author: Brad Roberts <braddr at puremagic.com>
> Date:   2011-02-19 (Sat, 19 Feb 2011)
> 
> Changed paths:
>   M posix.mak
> 
> Log Message:
> -----------
> Add an OS variable to posix.mak and disable core/time on freebsd until it can be fixed

What's broken about core.time on FreeBSD?

- Jonathan M Davis
February 20, 2011
On 2/20/2011 2:29 AM, Jonathan M Davis wrote:
> On Sunday 20 February 2011 01:39:50 noreply at github.com wrote:
>> Branch: refs/heads/master
>> Home:   https://github.com/D-Programming-Language/druntime
>>
>> Commit: d7ab02b7be3e172352855daa05edd5ce4ddf9e43
>> 
>> https://github.com/D-Programming-Language/druntime/commit/d7ab02b7be3e1723
>> 52855daa05edd5ce4ddf9e43 Author: Brad Roberts <braddr at puremagic.com>
>> Date:   2011-02-19 (Sat, 19 Feb 2011)
>>
>> Changed paths:
>>   M posix.mak
>>
>> Log Message:
>> -----------
>> Add an OS variable to posix.mak and disable core/time on freebsd until it can be fixed
> 
> What's broken about core.time on FreeBSD?
> 
> - Jonathan M Davis

One of the unit tests is calculating a slightly wrong value.  I only spent a few minutes digging into it and opted to disable and move on for the moment.  I'll dig out the relevant info once I get the auto-tester up and going.

February 20, 2011
On 2/20/2011 2:49 AM, Brad Roberts wrote:
> On 2/20/2011 2:29 AM, Jonathan M Davis wrote:
>> On Sunday 20 February 2011 01:39:50 noreply at github.com wrote:
>>> Branch: refs/heads/master
>>> Home:   https://github.com/D-Programming-Language/druntime
>>>
>>> Commit: d7ab02b7be3e172352855daa05edd5ce4ddf9e43
>>> 
>>> https://github.com/D-Programming-Language/druntime/commit/d7ab02b7be3e1723
>>> 52855daa05edd5ce4ddf9e43 Author: Brad Roberts <braddr at puremagic.com>
>>> Date:   2011-02-19 (Sat, 19 Feb 2011)
>>>
>>> Changed paths:
>>>   M posix.mak
>>>
>>> Log Message:
>>> -----------
>>> Add an OS variable to posix.mak and disable core/time on freebsd until it can be fixed
>>
>> What's broken about core.time on FreeBSD?
>>
>> - Jonathan M Davis
> 
> One of the unit tests is calculating a slightly wrong value.  I only spent a few minutes digging into it and opted to disable and move on for the moment.  I'll dig out the relevant info once I get the auto-tester up and going.

See my most recent comment to bug 5629:

in TickDuration's static this.  freebsd has clock_gettime, so it uses the clock_getres api.  The results:

    ts.tv_nsec = 280, ticksPerSec = 3571428

Later, during the unit test:

            auto t = TickDuration.from!"nsecs"(1_000_000_000);
            assert(t.nsecs == 1_000_000_000);

t.nsecs is slightly less: t.nsecs = 999999840

280 * 3571428 == 999999840
280 * 3571429 == 1000000120

So, it's a matter of precision.