Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - Software
Project
Project
Details
Activity
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
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
FMC TDC 1ns 5cha - Software
Commits
716b7a61
Commit
716b7a61
authored
Aug 17, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: fix to_ns convertion
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
a869ec6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fmctdc-lib-math.c
lib/fmctdc-lib-math.c
+3
-3
No files found.
lib/fmctdc-lib-math.c
View file @
716b7a61
...
...
@@ -21,9 +21,9 @@ uint64_t fmctdc_ts_approx_ns(struct fmctdc_time *a)
{
uint64_t
ns
=
0
;
ns
+=
a
->
seconds
*
1000000000
;
ns
+=
a
->
coarse
*
8
;
ns
+=
a
->
frac
*
81
.
03
/
1000
;
/* FIXME check this because in other func is different */
ns
+=
a
->
seconds
*
1000000000
ULL
;
ns
+=
((
uint64_t
)
a
->
coarse
)
*
8ULL
;
ns
+=
((
uint64_t
)
a
->
frac
)
*
8000ULL
/
4096ULL
/
1000ULL
;
return
ns
;
}
...
...
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