Mail Archives: cygwin/1997/06/05/03:15:26
Daniel P. Siu[SMTP:dps AT micro-mono DOT com] wrote:
>I just got started with gnu-win32 (w95). I encountered strange results
>with the 'times' library function (I know, this is obsolete but I also
>encountered strange though different results with the 'getrusage' system
>call). 'times' calls return should return number of 'CLK_TCK' since
>invocation of the current process. Instead it returns very big numbers
>(millions).
>
[snip]
>
>This works fine under f2c or g77 and many Unix systems including Linux
>and Solaris but gives strange under g77 and gnu-win32.
Just a suspicion on my part, but it's possible that the GNU-Win32
implementation uses GetProcessTimes or GetThreadTimes to calculate
the values to pass back through times(). According to a book I have,
these functions are not implemented in Windows 95 (and it says there
is no reliable way of getting such times under Windows 95, although
I remember someone mentioning a "close enough" solution once).
Probably the GNU-Win32 implementation is not checking the return
value (or is returning some sort of error indication but your code
is unaware of it) and the user and system times are simply garbage.
If possible run your program on NT. It may work over there.
For the GNU-Win32 people this is yet another hassle they will have
to deal with if they want to get something that works under Windows
95.
Colin.
-- Colin Peters - colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp
-- Saga University Dept. of Information Science
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/
-
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 -