Azure SDK for Embedded C
Functions
az_platform.h File Reference

Defines platform-specific functionality used by the Azure SDK. More...

#include <azure/core/az_result.h>
#include <stdbool.h>
#include <stdint.h>
#include <azure/core/_az_cfg_prefix.h>
#include <azure/core/_az_cfg_suffix.h>

Go to the source code of this file.

Functions

AZ_NODISCARD az_result az_platform_clock_msec (int64_t *out_clock_msec)
 Gets the platform clock in milliseconds. More...
 
AZ_NODISCARD az_result az_platform_sleep_msec (int32_t milliseconds)
 Tells the platform to sleep for a given number of milliseconds. More...
 

Detailed Description

Defines platform-specific functionality used by the Azure SDK.

Note
You MUST NOT use any symbols (macros, functions, structures, enums, etc.) prefixed with an underscore ('_') directly in your application code. These symbols are part of Azure SDK's internal implementation; we do not document these symbols and they are subject to change in future versions of the SDK which would break your code.

Function Documentation

◆ az_platform_clock_msec()

AZ_NODISCARD az_result az_platform_clock_msec ( int64_t *  out_clock_msec)

Gets the platform clock in milliseconds.

Remarks
The moment of time where clock starts is undefined, but if this function is getting called twice with one second interval, the difference between the values returned should be equal to 1000.
Parameters
[out]out_clock_msecPlatform clock in milliseconds.
Returns
An az_result value indicating the result of the operation.
Return values
AZ_OKSuccess.
AZ_ERROR_DEPENDENCY_NOT_PROVIDEDNo platform implementation was supplied to support this function.

◆ az_platform_sleep_msec()

AZ_NODISCARD az_result az_platform_sleep_msec ( int32_t  milliseconds)

Tells the platform to sleep for a given number of milliseconds.

Parameters
[in]millisecondsNumber of milliseconds to sleep.
Remarks
The behavior is undefined when milliseconds is a non-positive value (0 or less than 0).
Returns
An az_result value indicating the result of the operation.
Return values
AZ_OKSuccess.
AZ_ERROR_DEPENDENCY_NOT_PROVIDEDNo platform implementation was supplied to support this function.