mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
tests: test_hrt modernize NULL with nullptr
This commit is contained in:
committed by
Beat Küng
parent
879c698cab
commit
ee0ae079ff
@@ -190,10 +190,10 @@ int test_hrt(int argc, char *argv[])
|
|||||||
|
|
||||||
for (i = 0; i < 10; i++) {
|
for (i = 0; i < 10; i++) {
|
||||||
prev = hrt_absolute_time();
|
prev = hrt_absolute_time();
|
||||||
gettimeofday(&tv1, NULL);
|
gettimeofday(&tv1, nullptr);
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
now = hrt_absolute_time();
|
now = hrt_absolute_time();
|
||||||
gettimeofday(&tv2, NULL);
|
gettimeofday(&tv2, nullptr);
|
||||||
printf("%lu (%lu/%lu), %lu (%lu/%lu), %lu\n",
|
printf("%lu (%lu/%lu), %lu (%lu/%lu), %lu\n",
|
||||||
(unsigned long)prev, (unsigned long)tv1.tv_sec, (unsigned long)tv1.tv_usec,
|
(unsigned long)prev, (unsigned long)tv1.tv_sec, (unsigned long)tv1.tv_usec,
|
||||||
(unsigned long)now, (unsigned long)tv2.tv_sec, (unsigned long)tv2.tv_usec,
|
(unsigned long)now, (unsigned long)tv2.tv_sec, (unsigned long)tv2.tv_usec,
|
||||||
@@ -206,7 +206,7 @@ int test_hrt(int argc, char *argv[])
|
|||||||
printf("one-second ticks\n");
|
printf("one-second ticks\n");
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
hrt_call_after(&call, 1000000, NULL, NULL);
|
hrt_call_after(&call, 1000000, nullptr, nullptr);
|
||||||
|
|
||||||
while (!hrt_called(&call)) {
|
while (!hrt_called(&call)) {
|
||||||
usleep(1000);
|
usleep(1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user