adamczykpiotr / php-canbus

Extension for PHP to interface efficiently with a Controller Area Network (CAN bus) 2.0A / 2.0B
7 stars 5 forks source link

Timestamp? #2

Closed yachtwave closed 2 months ago

yachtwave commented 2 months ago

the candump utility provide a timestamp with the NMEa message. Any way to get this timestamp?

adamczykpiotr commented 2 months ago

This library doesn't provide any timestamp information for a frame. Usually there is little to no delay between receiving frame by a machine so you could use time() or new DateTime(). If your protocol is layer above CAN, you could always manually parse CAN frame yourself to obtain transmitted timestamp.