sam gordji wrote:
> I understand that u see the output on a Oscilloscope. I was wondering
> is there any other way we can check out the length of time slices for
> linux.

The gettimeofday() call has excellent resolution, try it in a periodic
handler instead of using an oscilloscope.

    static long long last_usec = 0;
    long long current_usec, diff_usec;      
    struct timeval current;    

    if (gettimeofday(&current, 0) == -1)
        perror("gettimeofday");
    else
        {
            current_usec = (long long) ((long long)current.tv_sec * 1000000)
+                       current.tv_usec;  /* add recent ticks to current time */
            diff_usec = current_usec - last_usec;   /* elapsed time */
            last_usec = current_usec;         /* capture current time */
        }

> Could u please give me ur input as to
>   * What all to do if i want to change the duration of time slices
>     ( i know to change HZ in param.h
>                 change SHIFT_HZ in timex.h )

That should do it.  I wasn't aware of the timex.h issue.

>   * Do i need to change the DEF_PRIORITY in sched.h??

Thats a good question for others on the RTLinux list.

-- Steve Rosenbluth

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to