Quote:
We have special functions for that. No need to poke system structures.
I have already feared that.
Quote:
NewGetTaskAttr() ... check <exec/task.h> or/and <exec/system.h>
Already checked before I did ask. Unfortunately, with no documentation
on my side it's not clear what they are good for.
Quote:
I guess TASKINFOTYPE_AGETICKS or TASKINFOTIME_CPUTIME is what
you want.
Thanks. Can you give me some more details about their functions? What
amount is returned and especially, what will be counted?
I already stumbled over TASKINFO_LAUNCHTIMETICKS and
SYSTEMINFO_LAUNCHTIMETICKS but I don't know what they are good
for.
I can only guess.
Quote:
Not sure what clock() is doing exactly... or what do you want to use it
for; f.ex. for measuring time distances there are other ways too.
clock_t clock ( void);
Returns the number of clock ticks elapsed since the program was launched.
With that, for example, a Delay(50) call would have no influence on the
value returned by clock(), because it really only takes into account the
time the task is up, running and especially performing something. In case
an asynchronous IO is made, it won't affect the returned value either.
With that one is able to determine the time consumed by the task by
ignoring the time which will be spent in devices (unless IOF_QUICK is set)
or in the DOS, where the task is sent asleep and at the earliest awakes
when the IO/packet is completed.
Normally clock() returns 50 ticks for an entire second but that value differs
from implementation to implementation. Using SAS/C for example,
TICKS_PER_SEC came to 1000.
So, my question is what TAG I should choose?
Thanks in advance.