Skip to content

Commit

Permalink
Use RCL_S_TO_NS
Browse files Browse the repository at this point in the history
  • Loading branch information
sloretz committed Sep 12, 2018
1 parent ae43ec8 commit 0520282
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions rcl/test/rcl/test_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ TEST_F(TestTimerFixture, test_canceled_timer) {

TEST_F(TestTimerFixture, test_rostime_time_until_next_call) {
rcl_ret_t ret;
const int64_t sec_5 = 5LL * 1000LL * 1000LL * 1000LL;
const int64_t sec_5 = RCL_S_TO_NS(5);
int64_t time_until = 0;

rcl_clock_t clock;
Expand Down Expand Up @@ -289,7 +289,7 @@ TEST_F(TestTimerFixture, test_rostime_time_until_next_call) {

TEST_F(TestTimerFixture, test_system_time_to_ros_time) {
rcl_ret_t ret;
const int64_t sec_5 = 5LL * 1000LL * 1000LL * 1000LL;
const int64_t sec_5 = RCL_S_TO_NS(5);

rcl_clock_t clock;
rcl_allocator_t allocator = rcl_get_default_allocator();
Expand Down Expand Up @@ -325,8 +325,8 @@ TEST_F(TestTimerFixture, test_system_time_to_ros_time) {

TEST_F(TestTimerFixture, test_ros_time_to_system_time) {
rcl_ret_t ret;
const int64_t sec_5 = 5LL * 1000LL * 1000LL * 1000LL;
const int64_t sec_1 = 1000LL * 1000LL * 1000LL;
const int64_t sec_5 = RCL_S_TO_NS(5);
const int64_t sec_1 = RCL_S_TO_NS(1);

rcl_clock_t clock;
rcl_allocator_t allocator = rcl_get_default_allocator();
Expand Down Expand Up @@ -366,10 +366,10 @@ TEST_F(TestTimerFixture, test_ros_time_to_system_time) {

TEST_F(TestTimerFixture, test_ros_time_backwards_jump) {
rcl_ret_t ret;
const int64_t sec_5 = 5LL * 1000LL * 1000LL * 1000LL;
const int64_t sec_3 = 3LL * 1000LL * 1000LL * 1000LL;
const int64_t sec_2 = 2LL * 1000LL * 1000LL * 1000LL;
const int64_t sec_1 = 1000LL * 1000LL * 1000LL;
const int64_t sec_5 = RCL_S_TO_NS(5);
const int64_t sec_3 = RCL_S_TO_NS(3);
const int64_t sec_2 = RCL_S_TO_NS(2);
const int64_t sec_1 = RCL_S_TO_NS(1);

rcl_clock_t clock;
rcl_allocator_t allocator = rcl_get_default_allocator();
Expand Down Expand Up @@ -408,9 +408,9 @@ TEST_F(TestTimerFixture, test_ros_time_backwards_jump) {
}

TEST_F(TestTimerFixture, test_ros_time_wakes_wait) {
const int64_t sec_5 = 5LL * 1000LL * 1000LL * 1000LL;
const int64_t sec_1 = 1000LL * 1000LL * 1000LL;
const int64_t sec_1_5 = 1500LL * 1000LL * 1000LL;
const int64_t sec_5 = RCL_S_TO_NS(5);
const int64_t sec_1 = RCL_S_TO_NS(1);
const int64_t sec_1_5 = RCL_S_TO_NS(3) / 2;

rcl_ret_t ret;
rcl_clock_t clock;
Expand Down

0 comments on commit 0520282

Please sign in to comment.