Skip to content

Commit

Permalink
clkmgr: update notification timestamp printing
Browse files Browse the repository at this point in the history
update notification timestamp printing to second with 3 decimal places.

Signed-off-by: Song Yoong Siang <[email protected]>
  • Loading branch information
yoongsiang2 authored and AzuraTarmiziIntel committed Aug 30, 2024
1 parent ad66d51 commit c55a424
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions clkmgr/sample/clkmgr_c_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ int main(int argc, char *argv[])
state.gm_identity[6], state.gm_identity[7]);
printf("| %-25s | %-15ld ns |\n",
"clock_offset", state.clock_offset);
printf("| %-25s | %-16f s |\n",
"notification_timestamp", state.notification_timestamp);
printf("| %-25s | %-16.3f s |\n",
"notification_timestamp", state.notification_timestamp / 1e9);
}
printf("+---------------------------+--------------------+\n");
if (subscription.composite_event[0]) {
Expand Down Expand Up @@ -254,8 +254,8 @@ int main(int argc, char *argv[])
state.gm_identity[6], state.gm_identity[7]);
printf("| %-25s | %-19ld ns |\n",
"clock_offset", state.clock_offset);
printf("| %-25s | %-20f s |\n",
"notification_timestamp", state.notification_timestamp);
printf("| %-25s | %-20.3f s |\n",
"notification_timestamp", state.notification_timestamp / 1e9);
}
printf("+---------------------------+--------------+-------------+\n");
if (subscription.composite_event[0]) {
Expand Down
8 changes: 4 additions & 4 deletions clkmgr/sample/clkmgr_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ int main(int argc, char *argv[])
state.gm_identity[6], state.gm_identity[7]);
printf("| %-25s | %-15ld ns |\n",
"clock_offset", state.clock_offset);
printf("| %-25s | %-16f s |\n",
"notification_timestamp", state.notification_timestamp);
printf("| %-25s | %-16.3f s |\n",
"notification_timestamp", state.notification_timestamp / 1e9);
}
printf("+---------------------------+--------------------+\n");
if (composite_event[0]) {
Expand Down Expand Up @@ -278,8 +278,8 @@ int main(int argc, char *argv[])
state.gm_identity[6], state.gm_identity[7]);
printf("| %-25s | %-19ld ns |\n",
"clock_offset", state.clock_offset);
printf("| %-25s | %-20f s |\n",
"notification_timestamp", state.notification_timestamp);
printf("| %-25s | %-20.3f s |\n",
"notification_timestamp", state.notification_timestamp / 1e9);
}
printf("+---------------------------+--------------+-------------+\n");
if (composite_event[0]) {
Expand Down

0 comments on commit c55a424

Please sign in to comment.