samedi 18 mai 2019

How to get system up / boot time in milliseconds in C++ in cross-platform (it should work in windows / IOS / Android / MAC)

I have written a framework dll in c++ which is getting used in cross- platforms like windows, Mac, Android , IOS. I need to implement one API get_time_since_boot_milli_seconds() which will give me time in milliseconds since boot of system cross - platform (windows / mac / IOS / Android).

I have found function like GetTickCount64() but it works only in windows. Similarly there are function which works only in Mac. I had tried std::chrono , but did not get any relevant API.

I expect standard std C++ function which could give me time in milliseconds since boot up in every platform.

Aucun commentaire:

Enregistrer un commentaire