improve readability of *s <=> ns macros
This commit is contained in:
		
							parent
							
								
									a44c14ce2b
								
							
						
					
					
						commit
						6ccbb35597
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue