Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
e681e820
Commit
e681e820
authored
Apr 09, 2002
by
Martin Pool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rather than a loop subtracting 1e6 to convert usecs to secs/usecs, just
use div/mod.
parent
08571358
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
io.c
io.c
+5
-5
No files found.
io.c
View file @
e681e820
...
@@ -405,14 +405,14 @@ static void sleep_for_bwlimit(int bytes_written)
...
@@ -405,14 +405,14 @@ static void sleep_for_bwlimit(int bytes_written)
if
(
!
bwlimit
)
if
(
!
bwlimit
)
return
;
return
;
assert
(
bytes_written
>
0
);
assert
(
bwlimit
>
0
);
tv
.
tv_sec
=
0
;
tv
.
tv_usec
=
bytes_written
*
1000
/
bwlimit
;
tv
.
tv_usec
=
bytes_written
*
1000
/
bwlimit
;
tv
.
tv_sec
=
tv
.
tv_usec
/
1000000
;
tv
.
tv_usec
=
tv
.
tv_usec
%
1000000
;
while
(
tv
.
tv_usec
>
1000000
)
{
tv
.
tv_sec
++
;
tv
.
tv_usec
-=
1000000
;
}
select
(
0
,
NULL
,
NULL
,
NULL
,
tv
);
select
(
0
,
NULL
,
NULL
,
NULL
,
tv
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment