PCANBasic, timestamp

The free CAN Software API (Application Programming Interface) for Windows®
Post Reply
riscy00
Posts: 2
Joined: Sun 18. Aug 2019, 00:40

PCANBasic, timestamp

Post by riscy00 » Sun 18. Aug 2019, 00:50

In reference to below snippet code in C# demo for PCAN-USB device. I understood there no timestamp for write message so I have to create one.

Code: Select all

TPCANTimestamp CANTimeStamp;
stsResult = PCANBasic.Read(m_PcanHandle, out CANMsg, out CANTimeStamp);
Can you hint or provide C# code that provide mSec and uSec so I can insert timestamp into my log message when TX happen (PCANBasic.Write(...)).

What .Net framework to provide same format, are they reference to UDT1970 epouch or Window or what?. The documentation does not reference which timestamp it reference to.

Thanks.
Last edited by M.Gerber on Mon 19. Aug 2019, 09:12, edited 1 time in total.
Reason: Inserted [code] tags for improved readability

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

Re: PCANBasic, timestamp

Post by K.Wagner » Mon 19. Aug 2019, 12:04

Hello,

please check this post: TPCANTimestamp Question

Also check the Microsoft documentation for Acquiring high-resolution time stamps. It contains all what you need.
Best regards,
Keneth

Post Reply