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 int64_t az_platform_clock_msec ()
 Gets the platform clock in milliseconds. More...
 
void 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 int64_t az_platform_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.
Returns
Platform clock in milliseconds.

◆ az_platform_sleep_msec()

void 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).