Hello,
Imagine having to implement a priority scheduler which will measure
the time needed by various C functions and eventually favor the
function with the lowest running time. What do I have to measure - CPU
time or calendar time? The problem is that this has to do with a
database so I/O time is important. The way I am doing it so far is
gettimeofday(&timeBefore, NULL);
callSomeFunction();
gettimeofdat(&timeAfter, NULL);
// manipulate times here
but I have the feeling it's not correct when the program goes into the
OS scheduler with other processes. The application is not multi-
threaded.
Thank you in advance
--
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
-- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line. Sorry.