File tree Expand file tree Collapse file tree 4 files changed +27
-3
lines changed
Expand file tree Collapse file tree 4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 2828 * The OS-specific code must \#include the correct headers that define the
2929 * prototypes for these functions before including this implementation file.
3030 *
31+ * NOTE: The OS-specific header must also define which POSIX clock ID to use -
32+ * this specifies the clockid_t parameter to use with clock_gettime(). In
33+ * most cases this should be CLOCK_REALTIME to allow the clock to be set, and
34+ * so the application will also see any manual/administrative clock changes.
35+ *
36+ * The clock ID is selected by defining the #OSAL_GETTIME_SOURCE_CLOCK macro.
3137 */
3238
3339/****************************************************************************************
Original file line number Diff line number Diff line change 3131#include "osconfig.h"
3232#include <time.h>
3333
34- #define OSAL_GETTIME_SOURCE_CLOCK CLOCK_MONOTONIC
34+ /**
35+ * \brief Idenfies the clock ID for OSAL clock operations on POSIX
36+ *
37+ * This is the POSIX clock ID that will be used to implement
38+ * OS_GetLocalTime() and OS_SetLocalTime().
39+ */
40+ #define OSAL_GETTIME_SOURCE_CLOCK CLOCK_REALTIME
3541
3642#endif /* OS_IMPL_GETTIME_H */
Original file line number Diff line number Diff line change 3131#include "osconfig.h"
3232#include <time.h>
3333
34- #define OSAL_GETTIME_SOURCE_CLOCK CLOCK_MONOTONIC
34+ /**
35+ * \brief Idenfies the clock ID for OSAL clock operations on RTEMS
36+ *
37+ * This is the POSIX clock ID that will be used to implement
38+ * OS_GetLocalTime() and OS_SetLocalTime().
39+ */
40+ #define OSAL_GETTIME_SOURCE_CLOCK CLOCK_REALTIME
3541
3642#endif /* OS_IMPL_GETTIME_H */
Original file line number Diff line number Diff line change 3131#include "osconfig.h"
3232#include <time.h>
3333
34- #define OSAL_GETTIME_SOURCE_CLOCK CLOCK_MONOTONIC
34+ /**
35+ * \brief Idenfies the clock ID for OSAL clock operations on VxWorks
36+ *
37+ * This is the POSIX clock ID that will be used to implement
38+ * OS_GetLocalTime() and OS_SetLocalTime().
39+ */
40+ #define OSAL_GETTIME_SOURCE_CLOCK CLOCK_REALTIME
3541
3642#endif /* OS_IMPL_GETTIME_H */
You can’t perform that action at this time.
0 commit comments