Main MRPT website > C++ reference for MRPT 1.9.9
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-2018, 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 <cstdint>
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
29  parameter is
30  non-nullptr, corresponding the date is placed in the variable it points to.
31 */
32 uint32_t getTimeOfDay(tm* date_ = nullptr, time_t* secs_ = nullptr);
33 
34 /*! \brief A platform-independent sleep routine.
35 
36  Time is measured in ms. The function will not return until the specified
37  number of ms have passed.
38 */
39 void msleep(uint32_t ms);
40 
42 
43 } // end of xsens namespace
44 
45 #endif // _XSENS_TIME_2006_09_12
xsens::msleep
void msleep(uint32_t ms)
A platform-independent sleep routine.
Definition: xsens_time.cpp:82
xsens::getTimeOfDay
uint32_t getTimeOfDay(tm *date_, time_t *secs_)
A platform-independent clock.
Definition: xsens_time.cpp:34
xsens::TimeStamp
uint64_t TimeStamp
A real-time timestamp (ms)
Definition: xsens_time.h:24
uint64_t
unsigned __int64 uint64_t
Definition: rptypes.h:50
xsens::timeStampNow
TimeStamp timeStampNow(void)
Definition: xsens_time.cpp:101
xsens
The namespace of all Xsens software since 2006.
Definition: cmt1.cpp:95
uint32_t
unsigned __int32 uint32_t
Definition: rptypes.h:47



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST