How do i calculate the millisecond difference from the following Ptime ,I am using boost::ptime I'm trying to calculate the time_duration in milliseconds to find the difference. i get value like 999975 but expected value is 975
ptime PreviousgpsTime = Mon Jun 28 17:07:10.054 2021 ptime NextgpsTime = Mon Jun 28 17:07:11.025 2021
double totalDiff = (NextgpsTime-PreviousgpsTime).total_milliseconds();
How to fix this and get the actual time duration.
Live On Coliru:
Prints