We use below method to get current time in milliseconds (C++11 way).
So we were using this method from long time, and currently we came to know that in few device (occasionally, not all time) it return value in minus so it create problems.
Mostly we used this in Daily-chest etc long curTimeMili = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
We store long var when chest is set and do curTimeMili - pastTimeMili to check difference.
Anyone have deep knowledge into this? Can we just make value absolute (curTimeMili) and use it?
std::chrono::system_clock::now() returns system clock. It may change when user change it or e.g: there is summer/winter time switch.
Maybe you can use std::chrono::steady_clock?