Skip to content

Commit

Permalink
expose ros_walltime and ros_steadytime (#73)
Browse files Browse the repository at this point in the history
so we can use these cross platform implementations elsewhere.
See e.g. ros/ros_comm#1249
  • Loading branch information
flixr authored and dirk-thomas committed Feb 2, 2018
1 parent 215a5e2 commit bf30220
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions include/ros/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ namespace ros
ROSTIME_DECL void normalizeSecNSec(uint64_t& sec, uint64_t& nsec);
ROSTIME_DECL void normalizeSecNSec(uint32_t& sec, uint32_t& nsec);
ROSTIME_DECL void normalizeSecNSecUnsigned(int64_t& sec, int64_t& nsec);
ROSTIME_DECL void ros_walltime(uint32_t& sec, uint32_t& nsec);
ROSTIME_DECL void ros_steadytime(uint32_t& sec, uint32_t& nsec);

/*********************************************************************
** Time Classes
Expand Down
11 changes: 6 additions & 5 deletions src/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ namespace ros
/*********************************************************************
** Cross Platform Functions
*********************************************************************/
/*
* These have only internal linkage to this translation unit.
* (i.e. not exposed to users of the time classes)
*/
void ros_walltime(uint32_t& sec, uint32_t& nsec)
void ros_walltime(uint32_t& sec, uint32_t& nsec)
{
#ifndef WIN32
#if HAS_CLOCK_GETTIME
Expand Down Expand Up @@ -221,6 +217,11 @@ namespace ros
#endif
}

/*
* These have only internal linkage to this translation unit.
* (i.e. not exposed to users of the time classes)
*/

/**
* @brief Simple representation of the rt library nanosleep function.
*/
Expand Down

0 comments on commit bf30220

Please sign in to comment.