mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-01-13 16:16:31 +00:00
Make CopySingle progress indicator only update every 2 seconds.
This commit is contained in:
parent
5a8a1ab528
commit
ce6c9c29ad
1 changed files with 5 additions and 2 deletions
|
@ -29,7 +29,7 @@ Bool CopySingleZ(U8 *f1, U8 *f2) //Just one file
|
|||
Bool CopySingle(U8 *f1, U8 *f2) //Just one file
|
||||
{
|
||||
U8 *absf1 = FileNameAbs(f1), *absf2 = FileNameAbs(f2), *buf;
|
||||
I64 count, n, size, attr1 = FileAttr(f1), attr2 = FileAttr(f2), i, j;
|
||||
I64 count, n, size, attr1 = FileAttr(f1), attr2 = FileAttr(f2), i, j, time = counts.jiffies;
|
||||
CFile *in_file = NULL, *out_file = NULL;
|
||||
|
||||
if (!StrCompare(absf1, absf2))
|
||||
|
@ -65,8 +65,11 @@ Bool CopySingle(U8 *f1, U8 *f2) //Just one file
|
|||
{
|
||||
n = COPY_BUF_BLKS;
|
||||
i = n << BLK_SIZE_BITS;
|
||||
if (size)
|
||||
if (counts.jiffies > time + 2000)
|
||||
{
|
||||
"\n [ %0.2f%% ]", 100 * ToF64(size - j) / size;
|
||||
time = counts.jiffies;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue