On Fri, Oct 30, 2009 at 1:49 AM, Corey Ashford <cjash...@linux.vnet.ibm.com> wrote: > stephane eranian wrote: >> >> 2009/10/29 黃崇智 <edwillam1...@gmail.com>: >>> >>> 2009/10/29 stephane eranian <eran...@googlemail.com> >>>> >>>> On Tue, Oct 27, 2009 at 3:48 AM, 黃崇智 <edwillam1...@gmail.com> wrote: >>>>>> >>>>>> hi, >>>>>> I want to ask : >>>>>> Can I get the timestamps at the beginning of the programs in sampling >>>>>> mode? >>>> >>>> No, you can't. One thing to know is that the timestamp is using >>>> sched_clock() >>>> in the kernel. I am sure there is a syscall to get to the same timing >>>> source. >>>> >>>> hi, stephane >>>> can I use the syscall sched_clock() at user space ? >>>> >> No. Try using getimeofday() and convert everything to nanoseconds. > > clock_gettime() might be a better choice, but you have to link with -lrt to > get the function. > Corey is right. I knew there was an equivalent user level function, but I just could not remember it. Thanks.
> Regards, > > - Corey > > Corey Ashford > Software Engineer > IBM Linux Technology Center, Linux Toolchain > Beaverton, OR > 503-578-3507 > cjash...@us.ibm.com > > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel