Re: SIGALRM handler execution time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have set ITIMER_REAL

On Sun, Oct 24, 2010 at 4:57 AM, Vimal <j.vimal@xxxxxxxxx> wrote:
Hi Prabhu,

On 21 October 2010 23:56, Prabhu nath <gprabhunath@xxxxxxxxx> wrote:
> Dear All,
>
>
> There is a time difference t between the time t1-at which the pending signal
> is set and the time t2-at which exact signal handler is executed.
>
> Question: I need to calculate the time difference between t1 and t2.

Have you set a virtual time interrupt (ITIMER_VIRTUAL) or real timer
interrupt (ITIMER_REAL)?

There are two components here:  scheduler latency and the timer
interrupt latency.  Both add up to the latency perceived by the
userspace program.  Which one do you want to measure?

If you're interested in the end latency and if you've set a
ITIMER_REAL timer, it's pretty easy to measure the latency upto some
precision.  Before setting the timer, note the 'start' real time using
gettimeofday.  After the timer handler (after time interval dt) fires,
note the real time 'end'.  (end-start) - dt should be the required
latency.

--
Vimal


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux