klash@leibniz.uucp (Karl (call me Klash)insky) (03/28/89)
Forgive the cross-posting on this one. Please respond by mail. If interest warrants, I will summarize and post. I've been trying to use times() to measure the real, user, and system time used by a portion of C code. The code is being used on Sun OS 3.4 (I think -- definitely not 4) and on an HP running HP-UX 6.2. It works find on the HP, but, for some reason, times() always seems to return 0 as the number if ticks since the 'arbitrary point in the past' that the man page mentions. I have declared "extern long times()" so that the compiler knows what time is really returned by times(). Also, the man page says specifically that the 'cstime' and 'cutime' fields contain measures of cpu usage for child processes for which the parent has executed a 'wait.' Is there any way to find out these values for processes for which no 'wait' has been executed? Karl Klashinsky "I shall endeavour to Bell-Northern Research, Ltd. function adequately." utgpu!bnr-vpa!bnr-fos!bnr-public!klash Lt. Data Karl Klashinsky "I shall endeavour to Bell-Northern Research, Ltd. function adequately." utgpu!bnr-vpa!bnr-fos!bnr-public!klash Lt. Data