I did it already, it does not change the times(3) behaviour... Consider the
following source code:
/* ----- */
#include <sys/times.h>
#include <unistd.h>
#include <stdio.h>
main() {
struct tms my_tms;
int slept;
long ret1, ret2;
slept=2;
printf("going to sleep %d sec...\n", slept);
ret1= (long)times(&my_tms);
slept=sleep((unsigned int)slept);
ret2= (long)times(&my_tms);
printf("before: times() returned %ld\n", ret1);
printf("after: times() returned %ld\n", ret2);
}
/* ----- */
When compiled on BLADE_0.3 then runned, it outputs (for example):
-----
going to sleep 2 sec...
before: times() returned 825630364
after: times() returned 825630366
-------
fred
P.S.: could somebody compile it on a recent RedHat AXP Linux and tell me if it
behaves the same way ? Thanks a lot.