Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Precision Time. More...

Macros

#define PRECISION_TIME_MAX   INT64_MAX
 Maximum representable precision time value.
#define PRECISION_TIME_MIN   INT64_MIN
 Minimum representable precision time value.

Typedefs

typedef int64_t precision_time_t
 Signed precision time value expressed in nanoseconds.

Functions

int precision_time_add (precision_time_t a, precision_time_t b, precision_time_t *result)
 Add two precision time values with overflow checking.
int precision_time_sub (precision_time_t a, precision_time_t b, precision_time_t *result)
 Subtract two precision time values with overflow checking.

Detailed Description

Precision Time.

Since
4.5
Version
0.1.0

Macro Definition Documentation

◆ PRECISION_TIME_MAX

#define PRECISION_TIME_MAX   INT64_MAX

#include <precision_time.h>

Maximum representable precision time value.

◆ PRECISION_TIME_MIN

#define PRECISION_TIME_MIN   INT64_MIN

#include <precision_time.h>

Minimum representable precision time value.

Typedef Documentation

◆ precision_time_t

#include <precision_time.h>

Signed precision time value expressed in nanoseconds.

Function Documentation

◆ precision_time_add()

int precision_time_add ( precision_time_t a,
precision_time_t b,
precision_time_t * result )

#include <precision_time.h>

Add two precision time values with overflow checking.

Parameters
aFirst operand in nanoseconds.
bSecond operand in nanoseconds.
resultDestination for the sum.
Return values
0on success.
-EINVALif result is null.
-ERANGEif the sum is not representable.

◆ precision_time_sub()

int precision_time_sub ( precision_time_t a,
precision_time_t b,
precision_time_t * result )

#include <precision_time.h>

Subtract two precision time values with overflow checking.

Parameters
aMinuend in nanoseconds.
bSubtrahend in nanoseconds.
resultDestination for the difference.
Return values
0on success.
-EINVALif result is null.
-ERANGEif the difference is not representable.