Initial timestamp

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
Gyula.L
Posts: 11
Joined: Fri 18. Oct 2024, 13:05

Initial timestamp

Post by Gyula.L » Tue 29. Oct 2024, 10:57

Hello,

I plan to get the initial timestamp in the moment of starting my application. The timestamp for all CAN frames will be then calculated, related to the initial timestamp.
I could do it by reading the very first frame and take its timestamp as reference - but I don't like this solution, as I need the timestamp before starting reading.
Is it possible to get only a timestamp, without reading frames?

I am using PCANBasic.NET.dll.

Gyula

K.Wagner
Software Development
Software Development
Posts: 1056
Joined: Wed 22. Sep 2010, 13:36

Re: Initial timestamp

Post by K.Wagner » Tue 29. Oct 2024, 11:03

Hello,

yes, this is possible. There is a class within the Assembly, that can be used for this purpose. Please see the documentation for it at SystemTimestamp Class, and check the property ElapsedMicroseconds.
Best regards,
Keneth

Post Reply