X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=utils%2FGPSsmooth%2FMIDG_main.cxx;h=613f1d39d8c77d40e0677b0397a410c0d7d29a0d;hb=4dc76922c88187269957737f7a5d23017f8d51ad;hp=696740147dd77be696829a866c1e7cf62089e724;hpb=429f2530de08f922d62fcfeade85740569e04768;p=flightgear.git diff --git a/utils/GPSsmooth/MIDG_main.cxx b/utils/GPSsmooth/MIDG_main.cxx index 696740147..613f1d39d 100644 --- a/utils/GPSsmooth/MIDG_main.cxx +++ b/utils/GPSsmooth/MIDG_main.cxx @@ -539,13 +539,13 @@ int main( int argc, char **argv ) { current_time_stamp.stamp(); /* Convert to ms */ - double elapsed_us = current_time_stamp - last_time_stamp; + double elapsed_us = (current_time_stamp - last_time_stamp).toUSecs(); if ( elapsed_us < (frame_us - 2000) ) { double requested_us = (frame_us - elapsed_us) - 2000 ; ulMilliSecondSleep ( (int)(requested_us / 1000.0) ) ; } current_time_stamp.stamp(); - while ( current_time_stamp - last_time_stamp < frame_us ) { + while ( (current_time_stamp - last_time_stamp).toUSecs() < frame_us ) { current_time_stamp.stamp(); } @@ -554,7 +554,7 @@ int main( int argc, char **argv ) { } cout << "Processed " << pos_count << " entries in " - << (current_time_stamp - start_time) / 1000000 << " seconds." + << current_time_stamp - start_time << " seconds." << endl; } else if ( serialdev.length() ) { // process incoming data from the serial port