[phobos] Proposal of StopWatch module

Michael Parker aldacron at gmail.com
Wed Aug 18 03:17:02 PDT 2010


On Wed, Aug 18, 2010 at 3:04 PM, SHOO <zan77137 at nifty.com> wrote:

>
> I have some knowledge about these problems.
> However, there is not the tool to measure really correct time by Windows.
> It means that Windows have a problem about timeGetTime equally.
> Ability of timeGetTime is about 10[ms] order. Besides, its accuracy is
> affected by programs to work in background.
> In the scene using a highly precise performance counter, the performance
> seems to be insufficiency.
>
> I think the problem that QPC has is the defect of OS and machines.
>
>
>
I wasn't suggesting you use timeGetTime here :-) But I wanted to bring up
the issues for anyone who wasn't aware. And, you mentioned
game programming in your original post. Game programmers are hyper-sensitive
about this sort of thing, but generally don't actually *need*
millisecond accuracy -- just consistency. However, one of the Game
Programming Gems books includes a timer implementation that uses
QPC, but programmatically takes into account the potential for unexpected
values. It would be nice to see a similar solution implemented
here. Of course anyone using the StopWatch could implement their own
solution to average out the values it returns, if they feel they need to,
but having it builtin would be sweet.

Just a suggestion. Even if you don't do it, I think this class would be a
great addition to Phobos.


-- 
Mike Parker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100818/3fadd0c4/attachment.html>


More information about the phobos mailing list