[Bf-committers] gettimeofday in thread.c's wait_timeout

joe joeedh at gmail.com
Sun Jan 24 00:03:14 CET 2010


Brecht fixed this, he used a function called ftime.

Joe

On Sat, Jan 23, 2010 at 10:09 AM, Mitchell Stokes <mogurijin at gmail.com> wrote:
> Yes and so is timeval.tv_sec, and timeval.tv_usec is in microseconds.
> Although I think I do see an error in my patch, it probably should be
> now / 1000.0 instead of now*1000.
>
> On Sat, Jan 23, 2010 at 3:06 AM, joe <joeedh at gmail.com> wrote:
>> Isn't time in whole seconds?
>>
>> Joe
>>
>> On Fri, Jan 22, 2010 at 8:09 PM, Mitchell Stokes <mogurijin at gmail.com> wrote:
>>> Hello Blender Devs,
>>>
>>> A recent commit to threads.c added a function called wait_timeout. In
>>> this function gettimeofday() is used, which MSVC does not define.
>>> However, it looks like to me that time() could be used instead of
>>> gettimeofday(). Also, timeval.tv_usec is in microseconds while I think
>>> the code was using it as milliseconds. So, here is a patch to use
>>> time(). It compiles on MSVC, but I didn't test it much beyond that.
>>>
>>> http://www.pasteall.org/10517/diff
>>>
>>> Cheers,
>>> Mitchell Stokes (Moguri)
>>> _______________________________________________
>>> Bf-committers mailing list
>>> Bf-committers at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list