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
d0748684
Commit
d0748684
authored
Jul 22, 2015
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time-wrs: add useful diags for adjust, remove useless one
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
5c5c8039
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
wrs-time.c
time-wrs/wrs-time.c
+9
-5
No files found.
time-wrs/wrs-time.c
View file @
d0748684
...
...
@@ -40,10 +40,12 @@ int wrs_adjust_counters(int64_t adjust_sec, int32_t adjust_nsec)
p
.
adjust_sec
=
adjust_sec
;
p
.
adjust_nsec
=
adjust_nsec
;
cmd
=
(
adjust_sec
?
HEXP_PPSG_CMD_ADJUST_SEC
:
HEXP_PPSG_CMD_ADJUST_NSEC
);
ret
=
minipc_call
(
hal_ch
,
DEFAULT_TO
,
&
__rpcdef_pps_cmd
,
&
rval
,
cmd
,
&
p
);
cmd
=
(
adjust_sec
?
HEXP_PPSG_CMD_ADJUST_SEC
:
HEXP_PPSG_CMD_ADJUST_NSEC
);
ret
=
minipc_call
(
hal_ch
,
DEFAULT_TO
,
&
__rpcdef_pps_cmd
,
&
rval
,
cmd
,
&
p
);
pp_diag
(
NULL
,
time
,
1
,
"Adjust: %i : %09i = %i
\n
"
,
adjust_sec
,
adjust_nsec
,
ret
);
if
(
ret
<
0
||
rval
<
0
)
{
pp_printf
(
"%s: error (local %i remote %i)
\n
"
,
__func__
,
ret
,
rval
);
...
...
@@ -252,7 +254,9 @@ static int wrs_time_set(struct pp_instance *ppi, TimeInternal *t)
static
int
wrs_time_adjust_offset
(
struct
pp_instance
*
ppi
,
long
offset_ns
)
{
pp_diag
(
ppi
,
time
,
1
,
"adjust offset %09li
\n
"
,
offset_ns
);
if
(
offset_ns
==
0
)
return
0
;
pp_diag
(
ppi
,
time
,
1
,
"adjust offset 0.%09li
\n
"
,
offset_ns
);
return
wrs_adjust_counters
(
0
,
offset_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