QDate
-
Hello I want to write program that calculates the time in milliseconds from 01.01.1970 to now.
I try
QDateTime::currentMSecsSinceEpoch() - QDateTime(QDate::currentDate()).toMSecsSinceEpoch()
to calculate 1 day in Mseconds. I cant multiple it with days number since 1970.
There has to be an easy way, I just havn't found it yet...
Thank you.
-
Hello I want to write program that calculates the time in milliseconds from 01.01.1970 to now.
I try
QDateTime::currentMSecsSinceEpoch() - QDateTime(QDate::currentDate()).toMSecsSinceEpoch()
to calculate 1 day in Mseconds. I cant multiple it with days number since 1970.
There has to be an easy way, I just havn't found it yet...
Thank you.
-
Hello I want to write program that calculates the time in milliseconds from 01.01.1970 to now.
I try
QDateTime::currentMSecsSinceEpoch() - QDateTime(QDate::currentDate()).toMSecsSinceEpoch()
to calculate 1 day in Mseconds. I cant multiple it with days number since 1970.
There has to be an easy way, I just havn't found it yet...
Thank you.
to calculate 1 day in Mseconds
24 * 60 * 60 * 1000
?I cant multiple it with days number since 1970.
time(NULL) * 1000ULL
?Not saying you should not do it as @Christian-Ehrlicher as shown with Qt call, just saying this is not hard! :)