From: robertlipe Date: Thu, 13 Jun 2013 04:45:48 +0000 (+0000) Subject: Add (yet unused) addUSec shim to datetime so we can begin migrating our X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~561 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6b8d68c512af483361d9724006f226580cf4b65a;p=gpsbabel.git Add (yet unused) addUSec shim to datetime so we can begin migrating our explicit microsec use. --- diff --git a/gpsbabel/src/core/datetime.h b/gpsbabel/src/core/datetime.h index b7f8e1edf..0270ba819 100644 --- a/gpsbabel/src/core/datetime.h +++ b/gpsbabel/src/core/datetime.h @@ -79,6 +79,13 @@ public: return &t_; } + // Before Qt, GPSBabel had a 'microseconds' which is excessive and + // not really supported in QDateTime. Milliseconds is fine, but we + // provide these shims for code that used usecs. + void addUSecs(qint64 usecs) const { + this->addMSecs(usecs / 1000); + } + // Integer form: YYMMDD int ymd() const { QDate date(this->date());