A suggestion for an enhancement would be to have a separate struct which uses 
RAII to start and stop the stop watch with that struct taking a 
delegate/function pointer that runs when the stop watch stops. That way, you 
get 
properly matched stops automatically, and you can just get it to automatically 
do whatever it is you want it to do when it's done - like print out the time 
elapsed. The result is that you can turn the whole usage of the stop watch into 
a single line of code. I've done similar stuff with stop watch code that I've 
written in the past, and I found it to be extremely useful.

- Jonathan M Davis
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to