#include <vtimer/chVtimer.h>int threadTimes(KnCap *actorcap, int threadli, KnTimeVal *internal, KnTimeVal *external);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
The threadTimes() system call returns the execution time of the thread whose local identifier is threadli, within the actor specified by actorcap.
If threadLi is equal to K_ALLACTORTHREADS, threadTimes() returns the total execution time of all the threads within the actor specified by actorcap.
The internal time is the time spent executing in the actor in which the thread(s) were originally created. The external time includes all execution time spent with the thread's execution actor set to another actor. In other words, while the thread(s) are executing in a cross-actor invocation.
The time spent in a microkernel system call is added to the current execution time (internal or external) of the thread (a microkernel system call is not considered cross-actor invocation).
The target actor and the current actor must be located on the same site.
On successful completion, threadTimes() returns K_OK. Otherwise, a negative error code is returned.
actorcap is an inconsistent actor capability, or threadli is not a valid thread identifier in the specified actor.
actorcap does not specify a reachable actor.
Some of the data provided are outside the current actor's address space.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|