On Thu, Mar 1, 2018 at 10:32 PM, Greg Gallagher <g...@embeddedgreg.com> wrote:
> Are you using Xenomai 2.6 or 3?  If you are using 3 use this guide instead:
>

I am using xenomai-3.0.6

> https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__alchemy__timer.html
>
> Post back if nothing there can help, but you may want to loot at the
> source for some of the utilities that calculate latency as a example
> to work from
>

OK thank you so much.
I replaced clock_nanosleep() with : rt_task_sleep() and
clock_gettime() with: rt_timer_read().
I think it works fine.
I also replaced: printf() with: rt_printf()

I guess these are the right replaced for xenomai.

But one doubt I still have:
I observed that I instead of using rt_task_sleep() , I can also use
the combination of: rt_task_set_periodic() and rt_task_wait_period().
Both are working as expected.
But I am confused which one is the right one to use? Will there be any
difference in measuring latency ?


> -Greg
>
> On Thu, Mar 1, 2018 at 7:37 AM, Pintu Kumar <pintu.p...@gmail.com> wrote:
>> Hi,
>>
>> I have one question about Xenomai native API
>>
>> 1) What is the native API equivalent for clock_gettime() ?
>>
>> I have seen this Xenomai native API guide but I could not find it.
>> https://xenomai.org/documentation/xenomai-2.6/pdf/native-api.pdf
>>
>> I have a simple pthread based POSIX application which I converted to native 
>> API.
>> But for calculating the latency difference I using this in both case:
>> clock_gettime(CLOCK_MONOTONIC, &now);
>>
>> But I observed that if I use only NATIVE skin, I could not see any
>> latency difference.
>> However, if I use POSIX skin I see the latency difference.
>>
>> So, I want to replace clock_gettime() with native API to find the
>> exact difference with native skin.
>>
>> Or, if there is any other better way to measurement latency difference
>> between POSIX API and native API, please let me know.
>>
>>
>>
>> Thank You!
>>
>> Regards,
>> Pintu

_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to