From: nik@tiuk.ti.com (Nick Ing-Simmons)
Subject: Re: Function times still broken?
16 Dec 1996 07:06:55 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199612161225.MAA09513.cygnus.gnu-win32@phoenix>
References: <199612160649.XAA10885@joplin.colorado.edu>
Original-To: fabio@joplin.colorado.edu
Original-Cc: gnu-win32@cygnus.com
In-Reply-To: <199612160649.XAA10885@joplin.colorado.edu>
 from Fabio Somenzi on Sun, 15 Dec 1996 23: 49:39 -0700
Original-Sender: owner-gnu-win32@cygnus.com

Fabio Somenzi <fabio@joplin.colorado.edu> writes:
>When I run the following program under b17.1 on my Win95 laptop
>----------------------------------------------------------------
>#include <stdio.h>
>#include <sys/types.h>
>#include <sys/times.h>
>
>int
>main()
>{
>    clock_t time;
>    struct tms buffer;
>
>    time = times(&buffer);
>
>    printf("buffer = %lu\n", (unsigned long) buffer.tms_utime);
>    printf("       = %lu\n", (unsigned long) buffer.tms_stime);
>    printf("       = %lu\n", (unsigned long) buffer.tms_cutime);
>    printf("       = %lu\n", (unsigned long) buffer.tms_cstime);
>    printf("time   = %lu\n", (unsigned long) time);
>
>    exit(0);
>
>}
>----------------------------------------------------------------
>I get results like this one:
>
>buffer = 560564963
>       = 551978954
>       = 0
>       = 0
>time   = 47919604
>
>The first two numbers should give the user and system CPU time of the
>process, but they rather seem random. Successive runs of the program
>produce increasinv values of "time" (as expected) but identical values
>of "buffer" (suspect).

As each "run" is a new "process" the buffer values should always 
be the same (give or take resolution).
That said values look weird.

-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
