performance of structs vs classes

Steven Schveighoffer schveiguy at yahoo.com
Mon Sep 26 13:30:28 PDT 2011


On Mon, 26 Sep 2011 15:58:48 -0400, bearophile <bearophileHUGS at lycos.com>  
wrote:

> Christian K.:
>
>> i totally misused the stopwatch api.
>
> I have misused it the same way, the first time. If other people will  
> find the same problem then it means its API has problems.

Have you ever used a real stopwatch?  It works the same way :)  Start/stop  
does not reset the time to 0, it just adds more time to the total.  Reset  
clears to 0.

I think probably the documentation needs to be better.  The example also  
suggests start resets the stopwatch.

-Steve


More information about the Digitalmars-d-learn mailing list