Developer slow refresh

.. add DEFINES += SLOW_REFRESH to slow down the
   background refresh on hosts with good performance
   when testing refresh code !
This commit is contained in:
Mark Liversedge
2014-12-30 10:39:07 +00:00
parent 15df8e51cf
commit 3b4e2b4372

View File

@@ -33,6 +33,10 @@
#include "JsonRideFile.h" // for DATETIME_FORMAT
#ifdef SLOW_REFRESH
#include "unistd.h"
#endif
// for sorting
bool rideCacheGreaterThan(const RideItem *a, const RideItem *b) { return a->dateTime > b->dateTime; }
bool rideCacheLessThan(const RideItem *a, const RideItem *b) { return a->dateTime < b->dateTime; }
@@ -323,6 +327,10 @@ itemRefresh(RideItem *&item)
// and trap changes during refresh to current ride
if (item == item->context->currentRideItem())
item->context->notifyRideChanged(item);
#ifdef SLOW_REFRESH
sleep(1);
#endif
}
}