improve readability of *s <=> ns macros

This commit is contained in:
William Woodall 2015-12-16 14:59:11 -08:00
parent a44c14ce2b
commit 6ccbb35597

View file

@ -23,12 +23,12 @@ extern "C"
#include "rcl/types.h"
#include "rcl/visibility_control.h"
#define RCL_S_TO_NS(seconds) (seconds * 1000000000)
#define RCL_MS_TO_NS(milliseconds) (milliseconds * 1000000)
#define RCL_S_TO_NS(seconds) (seconds * 1000 * 1000 * 1000)
#define RCL_MS_TO_NS(milliseconds) (milliseconds * 1000 * 1000)
#define RCL_US_TO_NS(microseconds) (microseconds * 1000)
#define RCL_NS_TO_S(nanoseconds) (nanoseconds / 1000000000)
#define RCL_NS_TO_MS(nanoseconds) (nanoseconds / 1000000)
#define RCL_NS_TO_S(nanoseconds) (nanoseconds / 1000 * 1000 * 1000)
#define RCL_NS_TO_MS(nanoseconds) (nanoseconds / 1000 * 1000)
#define RCL_NS_TO_US(nanoseconds) (nanoseconds / 1000)
/// Struct which encapsulates a point in time according to a system clock.