percent check for hours and days.
This commit is contained in:
parent
5c6ec309b1
commit
3694f72e91
|
@ -1851,6 +1851,11 @@ async_get_progress_after(uv_work_t *req) {
|
|||
unsigned int days_behind = left / 60 / 60 / 24;
|
||||
unsigned int percent = (unsigned int)(progress * 100.0);
|
||||
|
||||
if (percent == 100 || left < 0) {
|
||||
hours_behind = 0;
|
||||
days_behind = 0;
|
||||
}
|
||||
|
||||
Local<Object> result = NanNew<Object>();
|
||||
|
||||
result->Set(NanNew<String>("blocks"),
|
||||
|
|
Loading…
Reference in New Issue