Problem in measuring time!!
Hannes Mayer
h.mayer at inode.at
Mon Oct 11 18:26:57 CEST 2004
Tarik KHOUTAIF wrote:
> Hi Hannes, Hi Philipe
>
> That pleased to me to receive your answers.
> The rt_get_cpu_time_ns() returns time CPU, on the other hand the rt_get_time_ns() returns time in tick clock.
> I work in the periodic mode and not oneshot mode (When I use the one shot mode the value of lacapture of time is null).I my application I use 3 modules, module_init_port in which I initialize the serial port and the timer (rt_start_timer(1E1)), in the module module_send_and_wait "Master" I makes rt_get_time_ns() after writing and after reading in the serial port. In the module module_wait_and_answer I make rt_get_time_ns() after reading and after writing in the serial port .
> Is what the fact of initializing the timer in another module other than this in which we does rt_get_time_ns(), does not pose problem?
> Is the function get_timeof_day() returns the real time value of time?
> Best regards,
> Tarik
Tarik,
I've not dealt with that functions in detail, but I think rt_get_cpu_time_ns()
works in any case, since it returns the CPU time independent of any rtai timer.
*shrugs*
Best regards,
Hannes.
More information about the Rtai
mailing list