This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using get_cycles() to get the real elapsed time


sched_clock is used by the scheduler and POSIX CPU clocks/timers, which
have the same requirements of being accurate and cheap.  It returns ns.  
It can be called from interrupt level.  Its implementation is already
hardware-specific and is get_cycles with appropriate adjustments or 
something else with nice properties for the particular hardware.
I think this is in all likelihood the best interface to use, if the
hrtimer stuff is not.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]