delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/11/27/01:51:12

From: Alex Vinokur <alexvn AT bigfoot DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Getting system time used
Date: Tue, 27 Nov 2001 08:35:15 +0200
Organization: Scopus Network Technologies
Lines: 49
Message-ID: <3C033420.28634931@bigfoot.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1011126163809 DOT 14031B-100000 AT is>
NNTP-Posting-Host: 62.90.123.5
Mime-Version: 1.0
X-Trace: fu-berlin.de 1006842924 5435825 62.90.123.5 (16 [79865])
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


Eli Zaretskii wrote:

> On Mon, 26 Nov 2001, Alex Vinokur wrote:
>
> > The only field of  struct rusage is computed is DJGPP :
> >    struct timeval ru_utime;  /* total time used by process */
> >
> > How can we get total _system_ time used?
>
> DOS/Windows don't let DJGPP programs get at this kind of info.  In order
> to implement this functionality, one should modify __dpmi_int, which is a
> gateway to all system calls, so that it peeks at the system clock before
> and after the call, and accumulates the results.
>
> Would you like to volunteer to do that?

Thanks. Perhaps, it might be of interest to me. Unfortunately, I currently
have no time to do so serious work.
By the way, how many volunteers are developing DJGPP for DOS/Windows?
What are projects (improving) to be developed in the near future?

>
>
> > For instance, in UNIX
> > http://www.mcsr.olemiss.edu/cgi-bin/man-cgi?getrusage+3
> > struct rusage contains the fields
> >    struct timeval ru_utime;/* user time used */
> >    struct timeval ru_stime;/* system time used */
>
> On Unix systems, getrusage() talks to the OS kernel and gets the info
> directly from the OS.  So life is muche easier on Unix.

Yes, it is.

> No such luxury
> on DOS/Windows...

--
  ===========================
  Alex Vinokur
    mailto:alexvn AT bigfoot DOT com
    mailto:alexvn AT dr DOT com
    http://up.to/alexvn
    http://go.to/alexv_math
  ===========================


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019