Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!apple!amdahl!pacbell!att!cbnewsm!mks From: mks@cbnewsm.ATT.COM (manishkumar.sharma) Newsgroups: comp.lang.c Subject: TIME/TIMES mapping wanted Message-ID: <9257@cbnewsm.ATT.COM> Date: 13 Feb 90 20:21:58 GMT Distribution: usa Organization: AT&T Bell Laboratories Lines: 26 How can I map the output given by time(2) and times(2) in system V? Can it be done? For e.g. if I do this; time1=time() sleep 2 time2=time() then time2-time1 is exactly 2 secs. But if I do this; time1=times() sleep 2 time2=times() then time2-time1 is about 160 (in clock ticks/sec) HZ=100. 1. Why are they different? 2. How can they be mapped as a function of each other? i.e how can I use time() alone to get the value given by times()? 3. Specifically, SUN's BSD version supports times(), but does not return anything except the status code unlike system V which actually returns elapsed real time. How do I use time() for this on a SUNserver? Thanks. -Manish Sharma 201-949-0094 (att,ulysses)!holin!mks