micro-ROS / micro_ros_platformio

micro-ROS library for Platform.IO
Apache License 2.0
224 stars 80 forks source link

Wrong UNIX time from rmw_uros_sync_session #130

Closed ThorsAvenger closed 8 months ago

ThorsAvenger commented 8 months ago

When I run this little snippet of code in my program

    RCSOFTCHECK(rmw_uros_sync_session(500));
    int32_t time = rmw_uros_epoch_millis()
    Serial.printf(" Time: %ld\n\r", time);

The result is something like this: Time: 1362526237, which would convert from UNIX time to timestamp GMT: Thursday 28 February 2013 11:40:49, which is about 11 years ago. Am I doing something wrong?

ThorsAvenger commented 8 months ago

divide by 1000....