Page 1 of 1

PCANBasic, timestamp

Posted: Sun 18. Aug 2019, 00:50
by riscy00
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.

Re: PCANBasic, timestamp

Posted: Mon 19. Aug 2019, 12:04
by K.Wagner
Hello,

please check this post: TPCANTimestamp Question

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