
EXAMPLE: PROCESS EXECUTION TIMES
183
The process ha ndle can refer to a process that is still running or to one that
ha s terminated. Elapsed time can be computed by subtracting the crea tion time
from the exit time, as shown in the next example. The
type is a 64-bit
item; create a union with a
to perform the subtraction. The
example in Chapter 3 showed how to convert and display file times.
is similar and requires a thread handle for a parameter.
Chapter 7 covers thread management.
Example: Process Execution Times
The next example (Program 6–2) is a command called (time print) that is
similar to the UNIX
command ( is supported by the comman