Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
PPSi
Commits
1dda5f2d
Commit
1dda5f2d
authored
Mar 13, 2023
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l1e-state-machine.c: use __div64_32
parent
fc87c522
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
l1e-state-machine.c
proto-ext-l1sync/l1e-state-machine.c
+5
-1
No files found.
proto-ext-l1sync/l1e-state-machine.c
View file @
1dda5f2d
...
...
@@ -188,10 +188,14 @@ static inline Boolean le1_evt_LINK_OK(struct pp_instance *ppi) {
static
__inline__
int
measure_first_time
(
struct
pp_instance
*
ppi
)
{
struct
pp_time
current_time
;
int
ms
;
uint64_t
ns
;
TOPS
(
ppi
)
->
get
(
ppi
,
&
current_time
);
ms
=
(
current_time
.
secs
&
0xFFFF
)
*
1000
;
/* do not take all second - Not necessary to calculate a difference*/
ms
+=
((
current_time
.
scaled_nsecs
+
0x8000
)
>>
TIME_INTERVAL_FRACBITS
)
/
1000000
;
ns
=
(
current_time
.
scaled_nsecs
+
0x8000
)
>>
TIME_INTERVAL_FRACBITS
;
__div64_32
(
&
ns
,
1000000
);
ms
+=
ns
;
return
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