ROS Serial C client library
ros/src/ros_time.c File Reference

ROS Serial C time implementation. More...

#include "ros_time.h"
#include "ros_os.h"
Include dependency graph for ros_time.c:

Functions

rosTime_t rosTimeNow ()
 Get current time.
void rosTimeSetNow (rosTime_t *new_now)
 Set current time.
void rosRateInit (rosRate_t *rate, uint32_t frequency)
 Initialize rate.
void rosRateSleep (rosRate_t *rate)
 Sleep given rate.

Variables

uint32_t g_sync_request_time = 0
uint32_t g_sec_offset = 0
uint32_t g_nsec_offset = 0
uint32_t g_last_sync_time = 0
uint32_t g_last_sync_receive_time = 0
uint32_t g_last_msg_timeout_time = 0

Detailed Description

ROS Serial C time implementation.

Date:
04/19/2013
Author:
Peter Rudolph

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

License:
This library is released under LGPLv3.

Function Documentation

void rosRateInit ( rosRate_t rate,
uint32_t  frequency 
)

Initialize rate.

Parameters:
start_timeInitial start time
frequencyFrequency to achieve
Returns:
None

Here is the call graph for this function:

void rosRateSleep ( rosRate_t rate)

Sleep given rate.

Parameters:
ratePointer to rosRate_t struct

Here is the call graph for this function:

Get current time.

Returns:
current time

Here is the call graph for this function:

void rosTimeSetNow ( rosTime_t new_now)

Set current time.

Parameters:
pointerto a rosTime structure

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines