79 |
let v = file_priority f2 - file_priority f1 in |
let v = file_priority f2 - file_priority f1 in |
80 |
if v <> 0 then v else |
if v <> 0 then v else |
81 |
let s1 = if (file_size f1) > Int64.zero then |
let s1 = if (file_size f1) > Int64.zero then |
82 |
Int64.to_int (Int64.div (Int64.mul (file_downloaded f1) (Int64.of_int 100)) (file_size f1)) |
Int64.to_int ((file_downloaded f1) ** 100L // (file_size f1)) |
83 |
else 0 in |
else 0 in |
84 |
let s2 = if (file_size f2) > Int64.zero then |
let s2 = if (file_size f2) > Int64.zero then |
85 |
Int64.to_int (Int64.div (Int64.mul (file_downloaded f2) (Int64.of_int 100)) (file_size f2)) |
Int64.to_int ((file_downloaded f2) ** 100L // (file_size f2)) |
86 |
else 0 in |
else 0 in |
87 |
s2 - s1 |
s2 - s1 |
88 |
) c.client_file_queue; |
) c.client_file_queue; |