Develop #1

Merged
Sadra3st merged 6 commits from develop into main 2026-06-10 07:41:46 +00:00
Showing only changes of commit a7fbc21be9 - Show all commits
+7 -3
View File
@@ -20,13 +20,15 @@ public class DownloadWorker implements Runnable {
@Override
public void run() {
long start = System.currentTimeMillis();
chunkStatus.setStartTimeMs(start);
chunkStatus.setStartTimeMs(System.currentTimeMillis());
double downloaded = 0.0;
System.out.println(
"Chunk (id: " + chunkStatus.getChunkId() + ") has started downloading."
"[Worker-" + chunkStatus.getChunkId() +
"] Started downloading chunk of size: " +
String.format("%.2f", chunkStatus.getChunkSizeMB()) + " MB"
);
while (downloaded < chunkStatus.getChunkSizeMB()) {
@@ -38,7 +40,9 @@ public class DownloadWorker implements Runnable {
try {
Thread.sleep(randomSleepDelay);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
return;
}