Main MRPT website > C++ reference for MRPT 1.5.6
xsens_time.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #ifndef _XSENS_TIME_2006_09_12
10 #define _XSENS_TIME_2006_09_12
11 
12 #include <mrpt/utils/mrpt_stdint.h>
13 
14 #include <time.h>
15 
16 namespace xsens {
17 
18 //! The number of seconds in a normal day
19 #define XSENS_SEC_PER_DAY (60*60*24)
20 //! The number of milliseconds in a normal day
21 #define XSENS_MS_PER_DAY (XSENS_SEC_PER_DAY*1000)
22 
23 //! A real-time timestamp (ms)
25 
26 /*! \brief A platform-independent clock.
27 
28  The function returns the time of day in ms since midnight. If the \c date parameter is
29  non-NULL, corresponding the date is placed in the variable it points to.
30 */
31 uint32_t getTimeOfDay(tm* date_ = NULL, time_t* secs_ = NULL);
32 
33 /*! \brief A platform-independent sleep routine.
34 
35  Time is measured in ms. The function will not return until the specified
36  number of ms have passed.
37 */
38 void msleep(uint32_t ms);
39 
41 
42 } // end of xsens namespace
43 
44 #endif // _XSENS_TIME_2006_09_12
TimeStamp timeStampNow(void)
Definition: xsens_time.cpp:97
uint32_t getTimeOfDay(tm *date_, time_t *secs_)
A platform-independent clock.
Definition: xsens_time.cpp:29
void msleep(uint32_t ms)
A platform-independent sleep routine.
Definition: xsens_time.cpp:78
uint64_t TimeStamp
A real-time timestamp (ms)
Definition: xsens_time.h:24
unsigned __int64 uint64_t
Definition: rptypes.h:52
The namespace of all Xsens software since 2006.
Definition: cmt1.cpp:92
unsigned __int32 uint32_t
Definition: rptypes.h:49



Page generated by Doxygen 1.8.14 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at lun oct 28 01:35:26 CET 2019