Getting timestamp in C++

I created a C++ plugin and I’m trying to get the Unix timestamp in milliseconds. I tried a bunch of methods, one with timeb, but it worked sometimes, sometimes the time was completely wrong, so that won’t work. I tried chrono, which seems to be the most common way, but I get “unresolved externals” when I do it this way. Other methods all seem to fail. I’m on windows, so I tried SYSTEMTIME, but importing minwinbase.h also gives an error.

Is there any way to do this?

I’ve figured it out, with the code from here: Convert current time from windows to unix timestamp in C or C++ - Stack Overflow

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.