Skip to content

Should not use OS_GetLocalTime() for PSP timebase #266

@jphickey

Description

@jphickey

Is your feature request related to a problem? Please describe.
The PSP timebase (returned via CFE_PSP_Get_Timebase()) is used by CFE performance monitoring and it is important that this time is stable and does not get reset.

But depending on the implementation of OSAL, it may be possible to reset/change the OSAL "local time". At least there is an OS_SetLocalTime() function defined - whether it works or not depends on what kernel resource was used to implement this.

Describe the solution you'd like
On pc-linux and other POSIX-like systems this should use clock_gettime() with CLOCK_MONOTONIC directly, instead of calling OSAL.

Furthermore this function can be split into a separate module and therefore used on any system that provides clock_gettime()

Additional context
See nasa/osal#844 - OS_GetLocalTime() may be redefined/clarified to indeed refer to "real" time, which would make it less suitable for this purpose used here.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions