[Mono-devel-list] [PATCH] Bug Fix for GetTickCount in WAPI IO Layer

Paolo Molaro lupus at ximian.com
Mon Feb 28 09:01:02 EST 2005

On 02/28/05 Dick Porter wrote:
> However, using GetTickCount to look up the boot time is completely
> pointless on reliable OSes, because as Ben says the 32bit counter wraps
> round every 47 days.  Therefore I won't be applying a patch to "fix"
> this non-issue.

GetTickCount () is defined as returning the (possibly wrapped) number of
ms since the boot. Of course anyone who uses it to get the uptime is
stupid, but that doesn't mean we should not have a correct implementation
when possible. It's like not providing malloc() because someone may
misuse the pointer. A correct implementation is basically just two memory
loads more than the current (it would be enough to just store the
boot seconds, though), which is just noise performance-wise.


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list