Mail Archives: djgpp/2000/01/17/13:32:43
Eli Zaretskii writes:
>> So, on DOS, it doesn't seem that `time' could report much of
>> interest, anyway.
>
> Perhaps you could enhance getrusage so that `time' *does* report
> useful info. It's not too hard, really. You need:
>
> - hooks in dosexec.c, just before a child program is launched and
> after it exits, to record time spent in the child process;
>
> - hook in __dpmi_int, int86, and their ilk, to record ``system''
> time used by the process;
Wouldn't this accounting add a lot of additional overhead to these calls,
though? __dpmi_int() in particular is used frequently enough to be a
major performance bottleneck in some situations. I know that most of
that overhead is due to the processor mode switch, but surely none of
the time measurement functions are so cheap that we can afford to call
them twice for every system call...
Shawn Hargreaves.
- Raw text -