Skip to content

Commit

Permalink
Add LL suffix to avoid c4307 (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
sloretz authored Sep 13, 2018
1 parent f04cc66 commit 660e090
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/rcutils/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ extern "C"
#include "rcutils/visibility_control.h"

/// Convenience macro to convert seconds to nanoseconds.
#define RCUTILS_S_TO_NS(seconds) (seconds * (1000 * 1000 * 1000))
#define RCUTILS_S_TO_NS(seconds) (seconds * (1000LL * 1000LL * 1000LL))
/// Convenience macro to convert milliseconds to nanoseconds.
#define RCUTILS_MS_TO_NS(milliseconds) (milliseconds * (1000 * 1000))
#define RCUTILS_MS_TO_NS(milliseconds) (milliseconds * (1000LL * 1000LL))
/// Convenience macro to convert microseconds to nanoseconds.
#define RCUTILS_US_TO_NS(microseconds) (microseconds * 1000)
#define RCUTILS_US_TO_NS(microseconds) (microseconds * 1000LL)

/// Convenience macro to convert nanoseconds to seconds.
#define RCUTILS_NS_TO_S(nanoseconds) (nanoseconds / (1000 * 1000 * 1000))
#define RCUTILS_NS_TO_S(nanoseconds) (nanoseconds / (1000LL * 1000LL * 1000LL))
/// Convenience macro to convert nanoseconds to milliseconds.
#define RCUTILS_NS_TO_MS(nanoseconds) (nanoseconds / (1000 * 1000))
#define RCUTILS_NS_TO_MS(nanoseconds) (nanoseconds / (1000LL * 1000LL))
/// Convenience macro to convert nanoseconds to microseconds.
#define RCUTILS_NS_TO_US(nanoseconds) (nanoseconds / 1000)
#define RCUTILS_NS_TO_US(nanoseconds) (nanoseconds / 1000LL)

/// A single point in time, measured in nanoseconds since the Unix epoch.
typedef int64_t rcutils_time_point_value_t;
Expand Down

0 comments on commit 660e090

Please sign in to comment.