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

Mitchell Stokes mogurijin at gmail.com
Sat Jan 23 19:09:20 CET 2010


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
>


More information about the Bf-committers mailing list