www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/09/22/21:26:46

From: dbe AT wgn DOT net ($Bill Luebkert)
Subject: Re: using times()
22 Sep 1997 21:26:46 -0700 :
Message-ID: <342740C0.30FD.cygnus.gnu-win32@wgn.net>
References: <199709221156 DOT NAA74986 AT sp060 DOT cern DOT ch>
Reply-To: dbe AT wgn DOT net
Mime-Version: 1.0
To: fine AT mail DOT cern DOT ch
Cc: Sergey Okhapkin <sos AT prospect DOT com DOT ru>, gnu-win32 AT cygnus DOT com

Valery Fine wrote:
> 
> On 22 Sep 97 at 14:15, Sergey Okhapkin wrote:
> 
> > Valery Fine wrote:
> > > On 22 Sep 97 at 8:33, Sergey Okhapkin wrote:
> > >
> > >
> > > > times() call works on NT only. The underlying syscall
> > > > GetProcessTimes() unimplemented on windows 95. The output of your
> > > > examle looks the following on my box (NT4.0 SP3):
> > >
> > >   Probably like this would be better then just ZERO:
> > >
> >
> > I'm not sure. Probably, it's better to return -1 and to set errno to
> > ENOSYS, rather than return incorrect value.
> 
>   It would be as correct as the user's OS (namely Win95) provides
>   Since calling that API user wants (I guess) to estimate the time
>                                                  ========
>   and this incorrect value may help him but  ENOSYS ?
> 
>   Anyway it can not be absolutely precise value for any system. There
> is some error anyway. This error will be large for Win95. For this
> case the
> 
>                 "REAL exact value" <= "supplied"
> 
>  and it will be not far from the real one if the user's system is
>  running a single process.
> 
>  Is it wrong ?

I would say yes, you are wrong.  Sergey pointed out that the function
is not implemented on Win95.  Returning any value other than error 
would be a mistake in my opinion.

I agree with Sergey's response and -1 should be returned on Win95 
until it's possible to actually implement the feature.

-- 
  ,-/-  __      _  _         $Bill Luebkert
 (_/   /  )    // //       DBE Collectibles
  / ) /--<  o // //      http://www.wgn.net/~dbe/
-/-' /___/_<_</_</_    Email: dbe AT wgn DOT net
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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