Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
067cd537
Commit
067cd537
authored
Jun 12, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement roughly.
parent
42ea5c40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
util.c
util.c
+6
-0
util.h
util.h
+1
-0
No files found.
util.c
View file @
067cd537
...
...
@@ -63,6 +63,12 @@ seqno_plus(unsigned short s, int plus)
return
((
s
+
plus
)
&
0xFFFF
);
}
int
roughly
(
int
value
)
{
return
value
*
3
/
4
+
random
()
%
(
value
/
2
);
}
/* Like gettimeofday, but should return monotonic time. If POSIX clocks
are not available, falls back to gettimeofday. */
int
...
...
util.h
View file @
067cd537
...
...
@@ -26,6 +26,7 @@ int seqno_minus(unsigned short s1, unsigned short s2)
ATTRIBUTE
((
const
));
unsigned
short
seqno_plus
(
unsigned
short
s
,
int
plus
)
ATTRIBUTE
((
const
));
int
roughly
(
int
value
);
int
gettime
(
struct
timeval
*
tv
);
void
timeval_minus
(
struct
timeval
*
d
,
const
struct
timeval
*
s1
,
const
struct
timeval
*
s2
);
...
...
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