@@ -257,6 +257,7 @@ Napi::Value GetTimerPeriod(const Napi::CallbackInfo& info) {
257257 return Napi::BigInt::New (env, period_nsec);
258258}
259259
260+ #if ROS_VERSION > 2205 // 2205 == Humble
260261Napi::Value GetTimerNextCallTime (const Napi::CallbackInfo& info) {
261262 Napi::Env env = info.Env ();
262263 RclHandle* timer_handle = RclHandle::Unwrap (info[0 ].As <Napi::Object>());
@@ -274,6 +275,7 @@ Napi::Value GetTimerNextCallTime(const Napi::CallbackInfo& info) {
274275 return env.Undefined ();
275276 }
276277}
278+ #endif
277279
278280#if ROS_VERSION > 2205 // 2205 == Humble
279281Napi::Value CallTimerWithInfo (const Napi::CallbackInfo& info) {
@@ -362,9 +364,9 @@ Napi::Object InitTimerBindings(Napi::Env env, Napi::Object exports) {
362364 Napi::Function::New (env, TimerGetTimeUntilNextCall));
363365 exports.Set (" changeTimerPeriod" , Napi::Function::New (env, ChangeTimerPeriod));
364366 exports.Set (" getTimerPeriod" , Napi::Function::New (env, GetTimerPeriod));
367+ #if ROS_VERSION > 2205 // 2205 == Humble
365368 exports.Set (" getTimerNextCallTime" ,
366369 Napi::Function::New (env, GetTimerNextCallTime));
367- #if ROS_VERSION > 2205 // 2205 == Humble
368370 exports.Set (" setTimerOnResetCallback" ,
369371 Napi::Function::New (env, SetTimerOnResetCallback));
370372 exports.Set (" clearTimerOnResetCallback" ,
0 commit comments