-
Notifications
You must be signed in to change notification settings - Fork 13
Timing functions
This category contains functions for time comparisons. More...
| Type | Name |
|---|---|
| struct |
fplDateTime Stores a date and time with milliseconds, including the UTC offset. More... |
| struct |
fplDateTimeCreationResult Stores the result of a date time creation. More... |
| struct |
fplDateTimeResult Stores the components for a date and time, that may be computed from a date time stamp. More... |
| union |
fplTimestamp Stores a timestamp, used for delta measurements only. More... |
| Type | Name |
|---|---|
| #define |
FPL_TIMEOUT_INFINITE Infinite timeout constant. |
| Type | Name |
|---|---|
| typedef uint64_t |
fplMilliseconds A type definition for milliseconds (64-bit). |
| typedef double |
fplSeconds A type definition for seconds (64-bit). |
| typedef uint32_t |
fplTimeoutValue A type definition for a timeout value in milliseconds. |
| Type | Name |
|---|---|
| enum |
fplDateTimeErrors { fplDateTimeErrors_None , fplDateTimeErrors_InvalidYear , fplDateTimeErrors_InvalidMonth , fplDateTimeErrors_InvalidDay , fplDateTimeErrors_InvalidHour , fplDateTimeErrors_InvalidMinute , fplDateTimeErrors_InvalidSecond } Defines the date time error flags. More... |
| enum |
fplDateTimeType { fplDateTimeType_UTC , fplDateTimeType_Local } Defines the date time types. More... |
| Type | Name |
|---|---|
| fpl_common_api fplDateTimeCreationResult |
fplDateTimeCreate (const uint16_t year, const uint8_t month, const uint8_t day, const uint8_t hour, const uint8_t minute, const uint8_t second, const uint16_t millisecond, const int32_t utcOffset) Creates a date time from the specified date time components and UTC offset. |
| fpl_platform_api fplDateTime |
fplDateTimeQuery (const fplDateTimeType type) Gets the current date and time in the specified format (UTC or local). |
| fpl_platform_api fplDateTimeResult |
fplFormatDateTime (const fplDateTime dateTime, const fplDateTimeType type) Formats the date time into the specified format as a fplDateTimeResult. |
| fpl_platform_api fplMilliseconds |
fplMillisecondsQuery (void) Gets the current system clock in milliseconds, since some fixed starting point (OS start, System start, etc.), used for time delta measurements only. |
| fpl_platform_api fplSeconds |
fplTimestampElapsed (const fplTimestamp start, const fplTimestamp finish) Gets the delta value from two fplTimestamp values in seconds. |
| fpl_platform_api fplTimestamp |
fplTimestampQuery (void) Gets the current fplTimestamp with most precision, used for time delta measurements only. |
This category contains functions for time comparisons.
#define FPL_TIMEOUT_INFINITEInfinite timeout constant.
Definition at line 4666 of file final_platform_layer.h.
typedef uint64_t fplMillisecondsA type definition for milliseconds (64-bit).
Definition at line 4678 of file final_platform_layer.h.
typedef double fplSecondsA type definition for seconds (64-bit).
Definition at line 4672 of file final_platform_layer.h.
typedef uint32_t fplTimeoutValueA type definition for a timeout value in milliseconds.
Definition at line 4660 of file final_platform_layer.h.
enum fplDateTimeErrorsDefines the date time error flags.
Definition at line 4730 of file final_platform_layer.h.
enum fplDateTimeTypeDefines the date time types.
| Name | Description |
|---|---|
| fplDateTimeType_UTC | UTC type (+0). |
| fplDateTimeType_Local | Local type (+/- offset). |
Definition at line 4705 of file final_platform_layer.h.
fpl_common_api fplDateTimeCreationResult fplDateTimeCreate ( const uint16_t year, const uint8_t month, const uint8_t day, const uint8_t hour, const uint8_t minute, const uint8_t second, const uint16_t millisecond, const int32_t utcOffset )Creates a date time from the specified date time components and UTC offset.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | year | The year starting from 1970. |
| [in] | month | The month in range of 1-12. |
| [in] | day | The day in range of 1-31. |
| [in] | hour | The hour in range of 0-23. |
| [in] | minute | The minute in range of 0-59. |
| [in] | second | The second in range of 0-59. |
| [in] | millisecond | The millisecond in range of 0-999. |
| [in] | utcOffset | The UTC offset in minutes. |
Returns: Returns the created date time structure as
Note: If invalid arguments are passed, an empty date time is returned instead.
fpl_platform_api fplDateTime fplDateTimeQuery ( const fplDateTimeType type)Gets the current date and time in the specified format (UTC or local).
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | type | The target date time format as fplDateTimeType. |
Returns: Returns the date time structure as
fpl_platform_api fplDateTimeResult fplFormatDateTime ( const fplDateTime dateTime, const fplDateTimeType type )Formats the date time into the specified format as a fplDateTimeResult.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | dateTime | The date time as fplDateTime. |
| [in] | type | The target date time format as fplDateTimeType. |
Returns: Returns the computed date time fields as
fpl_platform_api fplMilliseconds fplMillisecondsQuery ( void )Gets the current system clock in milliseconds, since some fixed starting point (OS start, System start, etc.), used for time delta measurements only.
Returns: Returns the number of milliseconds as
fpl_platform_api fplSeconds fplTimestampElapsed ( const fplTimestamp start, const fplTimestamp finish )Gets the delta value from two fplTimestamp values in seconds.
Parameters
| Direction | Parameter | Description |
|---|---|---|
| [in] | start | The starting fplTimestamp. |
| [in] | finish | The ending fplTimestamp. |
Returns: Returns the resulting elapsed time in seconds as
fpl_platform_api fplTimestamp fplTimestampQuery ( void )Gets the current fplTimestamp with most precision, used for time delta measurements only.
Returns: Returns the resulting
Note: Use
fplTimestampElapsed() to get the elapsed time.
- Assertion & Debug
- Atomic operations
- Audio functions
- Clipboard functions
- Console functions
- Constants
- Display/Monitor functions
- Dynamic library loading
- Error Handling
- Files/IO functions
- Function macros
- Hardware Infos
- Input types and functions
- Localization functions
- Logging
- Memory Macros
- Memory functions
- Operating system Infos
- Path functions
- Platform functions
- Session Infos
- Settings & Configurations
- Storage class identifiers
- String functions
- Threading and synchronizations routines
- Timing functions
- Video functions
- Window events
- Window functions
- fplARMCPUCapabilities
- fplAudioChannelMap
- fplAudioDeviceID
- fplAudioDeviceInfo
- fplAudioFormat
- fplAudioSettings
- fplColor32
- fplConditionVariable
- fplConsoleSettings
- fplCPUCapabilities
- fplCPUIDLeaf
- fplDateTime
- fplDateTimeCreationResult
- fplDateTimeResult
- fplDisplayInfo
- fplDisplayMode
- fplDynamicLibraryHandle
- fplEndianess
- fplEvent
- fplFileEntry
- fplFileHandle
- fplFilePermissions
- fplFileTimeStamps
- fplGamepadButton
- fplGamepadData
- fplGamepadEvent
- fplGamepadInfo
- fplGamepadInputBinding
- fplGamepadMapping
- fplGamepadSettings
- fplGamepadState
- fplGamepadStates
- fplGraphicsApiSettings
- fplImageSource
- fplInputBackendMask
- fplInputBackendSupport
- fplInputDevice
- fplInputDeviceGuid
- fplInputSettings
- fplInternalConditionVariable
- fplInternalDynamicLibraryHandle
- fplInternalFileEntryHandle
- fplInternalFileHandle
- fplInternalFileRootInfo
- fplInternalMutexHandle
- fplInternalSemaphoreHandle
- fplInternalSignalHandle
- fplInternalThreadHandle
- fplKeyboardEvent
- fplKeyboardState
- fplLogSettings
- fplLogWriter
- fplLogWriterConsole
- fplLogWriterCustom
- fplMemoryAllocationSettings
- fplMemoryBlock
- fplMemoryInfos
- fplMemorySettings
- fplMouseEvent
- fplMouseState
- fplMutexHandle
- fplOpenGLSettings
- fplOSVersionInfos
- fplSemaphoreHandle
- fplSettings
- fplSignalHandle
- fplSpecificAudioSettings
- fplThreadHandle
- fplThreadParameters
- fplTimestamp
- fplVersionInfo
- fplVideoBackBuffer
- fplVideoRect
- fplVideoRequirements
- fplVideoRequirementsVulkan
- fplVideoSettings
- fplVideoSurface
- fplVideoSurfaceOpenGL
- fplVideoSurfaceVulkan
- fplVideoWindow
- fplVulkanSettings
- fplWindowCallbacks
- fplWindowDropFiles
- fplWindowEvent
- fplWindowPosition
- fplWindowSettings
- fplWindowSize
- fplX86CPUCapabilities