How can I get QDateTime to return the time in second and micro second
-
wrote on 26 Apr 2016, 18:44 last edited by
I am trying to replace ACE_Time_Value and I want to print the current time as <second>.<microsecond> .
QDateTime has a function currentMSecsSinceEpoch() which return the time in millisecond. but I need a more refine the millisecond. -
wrote on 26 Apr 2016, 18:51 last edited by
You can use
QDateTiem dateTimeObject;
dateTimeObject.toString("ss.zzz");Regards
Gerd -
wrote on 26 Apr 2016, 18:56 last edited by
-
wrote on 26 Apr 2016, 19:05 last edited by
Milliseconds is the max resolution of QTime/QDateTime objects. I suspect you have to do your own implementation of a time-class if you need a higher resolution.
Regards
Gerd -
I am trying to replace ACE_Time_Value and I want to print the current time as <second>.<microsecond> .
QDateTime has a function currentMSecsSinceEpoch() which return the time in millisecond. but I need a more refine the millisecond. -
wrote on 27 Apr 2016, 11:20 last edited by
Thanks for you response
1/6