Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
a5c9580c
Commit
a5c9580c
authored
Jul 07, 2014
by
mubarak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating codes_local_latency to generate events with time stamp > g_tw_lookahead
parent
c68713b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
codes/codes.h
codes/codes.h
+5
-2
No files found.
codes/codes.h
View file @
a5c9580c
...
...
@@ -30,13 +30,17 @@ static inline tw_event * codes_event_new(
/* Modeled latency for communication between local software components and
* communication between daemons and hardware devices. Measured in
* nanoseconds.
* Modified Jul 7: We want to make sure that the event time stamp generated
is always greater than the default g_tw_lookahead value. Multiplying by 1.1
ensures that if tw_rand_exponential generates a zero time-stamped event, we
still have a timestamp that is greater than g_tw_lookahead.
*/
#define CODES_MEAN_LOCAL_LATENCY 0.01
static
inline
tw_stime
codes_local_latency
(
tw_lp
*
lp
)
{
tw_stime
tmp
;
tmp
=
tw_rand_exponential
(
lp
->
rng
,
CODES_MEAN_LOCAL_LATENCY
);
tmp
=
(
1
.
1
*
g_tw_lookahead
)
+
tw_rand_exponential
(
lp
->
rng
,
CODES_MEAN_LOCAL_LATENCY
);
return
(
tmp
);
}
...
...
@@ -47,7 +51,6 @@ static inline void codes_local_latency_reverse(tw_lp *lp)
return
;
}
#endif
/* CODES_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