Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
32
Issues
32
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Software for White Rabbit PTP Core
Commits
9f94bb86
Commit
9f94bb86
authored
Feb 12, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
timer: define time_before() etc
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
ab36ee07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
syscon.h
include/syscon.h
+10
-0
No files found.
include/syscon.h
View file @
9f94bb86
...
...
@@ -8,6 +8,16 @@
uint32_t
timer_get_tics
(
void
);
void
timer_delay
(
uint32_t
tics
);
/* The following ones come from the kernel, but simplified */
#ifndef time_after
#define time_after(a,b) \
((long)(b) - (long)(a) < 0)
#define time_before(a,b) time_after(b,a)
#define time_after_eq(a,b) \
((long)(a) - (long)(b) >= 0)
#define time_before_eq(a,b) time_after_eq(b,a)
#endif
/* This can be used for up to 2^32 / TICS_PER_SECONDS == 42 seconds in wrs */
static
inline
void
timer_delay_ms
(
int
ms
)
{
...
...
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