Cross platform millisecond resolution timestamp

I’d like to log millisecond resolution timestamps but I’m finding it hard to find information on getting the time within Xojo.

I came across a thread which uses an external API call on Windows here

What’s the recommended way to get an accurate time on Linux and Mac ?

Do I need to start writing little external shared libraries in C for ‘advanced’ functionality like this ?

The particular part of my system will run as a server daemon mainly on Linux systems although of course it will be able to run on both Windows and Mac based systems a swell so it’s important that I address all three platforms at the same resolution.

Any ideas or should I start writing a bit of C ?

There are no timestamps with millisecond resolution in Xojo

You’ll end up having to rely on OS calls to get at a clock that is monotonically increasing so you avoid the issues around DST switchovers (unless you WANT those but most times you want a timestamp you don’t)

SystemTime on Windows may go backwards (or jump forwards) - see

You should be able to find one suitable if you go through
Time -
Timers -