I have been trying to find an example using std::chrono which simply gets a chrono::time_point
and extracts the number of hours and number of minutes as integers.
I have:
std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
but I cannot find out how to then extract the hours and the minutes (since midnight)? I am looking for something like:
int hours = now.clock.hours();
Aucun commentaire:
Enregistrer un commentaire