Mail Archives: cygwin/1996/12/16/07:06:55
Fabio Somenzi <fabio AT joplin DOT colorado DOT 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 AT cygnus DOT com" with one line of text: "help".
- Raw text -