mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user