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
9ec16c83
Commit
9ec16c83
authored
Aug 19, 2000
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added msleep() function
parent
a24c6870
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
util.c
util.c
+26
-0
No files found.
util.c
View file @
9ec16c83
...
...
@@ -929,6 +929,32 @@ char *timestring(time_t t)
return
(
TimeBuf
);
}
/*******************************************************************
sleep for a specified number of milliseconds
********************************************************************/
void
msleep
(
int
t
)
{
int
tdiff
=
0
;
struct
timeval
tval
,
t1
,
t2
;
gettimeofday
(
&
t1
,
NULL
);
gettimeofday
(
&
t2
,
NULL
);
while
(
tdiff
<
t
)
{
tval
.
tv_sec
=
(
t
-
tdiff
)
/
1000
;
tval
.
tv_usec
=
1000
*
((
t
-
tdiff
)
%
1000
);
errno
=
0
;
select
(
0
,
NULL
,
NULL
,
NULL
,
&
tval
);
gettimeofday
(
&
t2
,
NULL
);
tdiff
=
(
t2
.
tv_sec
-
t1
.
tv_sec
)
*
1000
+
(
t2
.
tv_usec
-
t1
.
tv_usec
)
/
1000
;
}
}
#ifdef __INSURE__
#include <dlfcn.h>
...
...
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