Time conversion functions in OSAL Topic is solved

Use this forum for requesting small changes in ChibiOS. Large changes should be discussed in the development forum. This forum is NOT for support.
Post Reply
User avatar
stertingen
Posts: 21
Joined: Mon Jan 13, 2020 10:55 pm
Has thanked: 7 times
Been thanked: 7 times

Time conversion functions in OSAL

Post by stertingen »

Currently, using OSAL I'm able to convert (Milli-,Micro-)Seconds into system ticks but not vice versa.

It would be nice to get the current time in milliseconds without doing the conversion by hand or depending on the OS's time conversion.

My use case is a ROSSerial client driver for ChibiOS HAL using nothing but the HAL. (https://github.com/ros-drivers/rosserial/pull/493)
rreignier
Posts: 23
Joined: Sat Apr 15, 2017 11:49 pm
Has thanked: 8 times
Been thanked: 4 times

Re: Time conversion functions in OSAL

Post by rreignier »

I agree with you.

When I did my rosserial_chibios I used the version found in lwip_binding but it is not very handy. Nice macros like in RT would be nice.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Time conversion functions in OSAL

Post by Giovanni »

Hi,

Added to trunk code.

Giovanni
Post Reply