We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe3834c commit 048f6d9Copy full SHA for 048f6d9
tools/testing/selftests/ptp/testptp.c
@@ -110,7 +110,7 @@ static long ppb_to_scaled_ppm(int ppb)
110
111
static int64_t pctns(struct ptp_clock_time *t)
112
{
113
- return t->sec * 1000000000LL + t->nsec;
+ return t->sec * NSEC_PER_SEC + t->nsec;
114
}
115
116
static void usage(char *progname)
@@ -317,7 +317,7 @@ int main(int argc, char *argv[])
317
tx.time.tv_usec = adjns;
318
while (tx.time.tv_usec < 0) {
319
tx.time.tv_sec -= 1;
320
- tx.time.tv_usec += 1000000000;
+ tx.time.tv_usec += NSEC_PER_SEC;
321
322
323
if (clock_adjtime(clkid, &tx) < 0) {
0 commit comments