@@ -77,7 +77,7 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
77
77
QDateTime currentDate = QDateTime::currentDateTime ();
78
78
79
79
// keep a vector of samples of verification progress at height
80
- blockProcessTime.push_front (qMakePair (currentDate.currentMSecsSinceEpoch (), nVerificationProgress));
80
+ blockProcessTime.push_front (qMakePair (currentDate.toMSecsSinceEpoch (), nVerificationProgress));
81
81
82
82
// show progress speed if we have more then one sample
83
83
if (blockProcessTime.size () >= 2 )
@@ -93,8 +93,7 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
93
93
QPair<qint64, double > sample = blockProcessTime[i];
94
94
95
95
// take first sample after 500 seconds or last available one
96
- if (sample.first < (currentDate.currentMSecsSinceEpoch () - 500 *1000 ) || i == blockProcessTime.size ()-1 )
97
- {
96
+ if (sample.first < (currentDate.toMSecsSinceEpoch () - 500 * 1000 ) || i == blockProcessTime.size () - 1 ) {
98
97
progressDelta = progressStart-sample.second ;
99
98
timeDelta = blockProcessTime[0 ].first - sample.first ;
100
99
progressPerHour = progressDelta/(double )timeDelta*1000 *3600 ;
@@ -108,7 +107,6 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
108
107
// show expected remaining time
109
108
ui->expectedTimeLeft ->setText (GUIUtil::formateNiceTimeOffset (remainingMSecs/1000.0 ));
110
109
111
- // keep maximal 5000 samples
112
110
static const int MAX_SAMPLES = 5000 ;
113
111
if (blockProcessTime.count () > MAX_SAMPLES)
114
112
blockProcessTime.remove (MAX_SAMPLES, blockProcessTime.count ()-MAX_SAMPLES);
0 commit comments