Subject: Re: Function times still broken?
From: [email-masked] (Nick Ing-Simmons)

16 Dec 1996 07:06:55 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <199612161225.MAA09513.cygnus.gnu-win32@phoenix>
References: <[email-masked]>
Original-To: [email-masked]
Original-Cc: [email-masked]
In-Reply-To: <[email-masked]>
 from Fabio Somenzi on Sun, 15 Dec 1996 23: 49:39 -0700
Original-Sender: [email-masked]

Fabio Somenzi <[email-masked]> 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
"[email-masked]" with one line of text: "help".