Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

ofGetSystemTimeMillis() not working on MacOS

$
0
0

Hey everyone, it seems that ofGetSystemTimeMillis() isn’t working correctly (it seems to be returning a much lower number than it should.

You can test this by using :

  auto duration = std::chrono::system_clock::now().time_since_epoch();
  uint64_t systemtime = std::chrono::duration_cast<std::chrono::milliseconds>(duration).count(); 
  ofLogNotice("chrono now().time_since_epoch(): ") << systemtime;
  ofLogNotice("ofGetSystemTimeMillis()        : ") << ofGetSystemTimeMillis();
    

On my system at least I get the following :

[notice ] chrono now().time_since_epoch(): : 1670425706801
[notice ] ofGetSystemTimeMillis()        : : 9242956

I’ve had a look in the code but unfortunately I’m very confused by std::chrono, otherwise I might be able to help more!

Kindest

Seb

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles