Re: Profiler class, suggestions and comments welcome
On Aug 20, 5:09 pm, Francesco <entul...@gmail.com> wrote:
- Shall I start adding "throw()" to all functions - and ensure
that none of them actually throws by wrapping the code into
try / catch blocks?
Only if it's an important part of their contract that they don't
throw. (Note that a function which guarantees that it doesn't
throw can't use any of the standard containers, including
std::string.)
- Does it make any difference to use clock_t against
std::clock_t (and the alike, using C functions incorporated
into the std namespace)?
Formally, if you include <ctime>, it's std::clock_t, and if you
include <time.h>, it's clock_t (or ::clock_t). I generally
prefer the latter---it's a C interface, and should look like
one. (Also, I work a lot on Posix based systems, where the C
headers are somewhat modified anyway.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34