Message-ID: From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: `void main' in Gnu packages---?! Date: Mon, 17 Jan 2000 16:53:39 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Reply-To: djgpp AT delorie DOT com 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.