Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Conversion between epoch ticks and other units. More...
#include <zephyr/sys/time_units.h>
Go to the source code of this file.
Macros | |
#define | k_sec_to_epoch_floor32(t) |
Convert seconds to epoch ticks. | |
#define | k_sec_to_epoch_floor64(t) |
Convert seconds to epoch ticks. | |
#define | k_sec_to_epoch_near32(t) |
Convert seconds to epoch ticks. | |
#define | k_sec_to_epoch_near64(t) |
Convert seconds to epoch ticks. | |
#define | k_sec_to_epoch_ceil32(t) |
Convert seconds to epoch ticks. | |
#define | k_sec_to_epoch_ceil64(t) |
Convert seconds to epoch ticks. | |
#define | k_ms_to_epoch_floor32(t) |
Convert milliseconds to epoch ticks. | |
#define | k_ms_to_epoch_floor64(t) |
Convert milliseconds to epoch ticks. | |
#define | k_ms_to_epoch_near32(t) |
Convert milliseconds to epoch ticks. | |
#define | k_ms_to_epoch_near64(t) |
Convert milliseconds to epoch ticks. | |
#define | k_ms_to_epoch_ceil32(t) |
Convert milliseconds to epoch ticks. | |
#define | k_ms_to_epoch_ceil64(t) |
Convert milliseconds to epoch ticks. | |
#define | k_us_to_epoch_floor32(t) |
Convert microseconds to epoch ticks. | |
#define | k_us_to_epoch_floor64(t) |
Convert microseconds to epoch ticks. | |
#define | k_us_to_epoch_near32(t) |
Convert microseconds to epoch ticks. | |
#define | k_us_to_epoch_near64(t) |
Convert microseconds to epoch ticks. | |
#define | k_us_to_epoch_ceil32(t) |
Convert microseconds to epoch ticks. | |
#define | k_us_to_epoch_ceil64(t) |
Convert microseconds to epoch ticks. | |
#define | k_ns_to_epoch_floor32(t) |
Convert nanoseconds to epoch ticks. | |
#define | k_ns_to_epoch_floor64(t) |
Convert nanoseconds to epoch ticks. | |
#define | k_ns_to_epoch_near32(t) |
Convert nanoseconds to epoch ticks. | |
#define | k_ns_to_epoch_near64(t) |
Convert nanoseconds to epoch ticks. | |
#define | k_ns_to_epoch_ceil32(t) |
Convert nanoseconds to epoch ticks. | |
#define | k_ns_to_epoch_ceil64(t) |
Convert nanoseconds to epoch ticks. | |
#define | k_ticks_to_epoch_floor32(t) |
Convert ticks to epoch ticks. | |
#define | k_ticks_to_epoch_floor64(t) |
Convert ticks to epoch ticks. | |
#define | k_ticks_to_epoch_near32(t) |
Convert ticks to epoch ticks. | |
#define | k_ticks_to_epoch_near64(t) |
Convert ticks to epoch ticks. | |
#define | k_ticks_to_epoch_ceil32(t) |
Convert ticks to epoch ticks. | |
#define | k_ticks_to_epoch_ceil64(t) |
Convert ticks to epoch ticks. | |
#define | k_epoch_to_sec_floor32(t) |
Convert epoch ticks to seconds. | |
#define | k_epoch_to_sec_floor64(t) |
Convert epoch ticks to seconds. | |
#define | k_epoch_to_sec_near32(t) |
Convert epoch ticks to seconds. | |
#define | k_epoch_to_sec_near64(t) |
Convert epoch ticks to seconds. | |
#define | k_epoch_to_sec_ceil32(t) |
Convert epoch ticks to seconds. | |
#define | k_epoch_to_sec_ceil64(t) |
Convert epoch ticks to seconds. | |
#define | k_epoch_to_ms_floor32(t) |
Convert epoch ticks to milliseconds. | |
#define | k_epoch_to_ms_floor64(t) |
Convert epoch ticks to milliseconds. | |
#define | k_epoch_to_ms_near32(t) |
Convert epoch ticks to milliseconds. | |
#define | k_epoch_to_ms_near64(t) |
Convert epoch ticks to milliseconds. | |
#define | k_epoch_to_ms_ceil32(t) |
Convert epoch ticks to milliseconds. | |
#define | k_epoch_to_ms_ceil64(t) |
Convert epoch ticks to milliseconds. | |
#define | k_epoch_to_us_floor32(t) |
Convert epoch ticks to microseconds. | |
#define | k_epoch_to_us_floor64(t) |
Convert epoch ticks to microseconds. | |
#define | k_epoch_to_us_near32(t) |
Convert epoch ticks to microseconds. | |
#define | k_epoch_to_us_near64(t) |
Convert epoch ticks to microseconds. | |
#define | k_epoch_to_us_ceil32(t) |
Convert epoch ticks to microseconds. | |
#define | k_epoch_to_us_ceil64(t) |
Convert epoch ticks to microseconds. | |
#define | k_epoch_to_ns_floor32(t) |
Convert epoch ticks to nanoseconds. | |
#define | k_epoch_to_ns_floor64(t) |
Convert epoch ticks to nanoseconds. | |
#define | k_epoch_to_ns_near32(t) |
Convert epoch ticks to nanoseconds. | |
#define | k_epoch_to_ns_near64(t) |
Convert epoch ticks to nanoseconds. | |
#define | k_epoch_to_ns_ceil32(t) |
Convert epoch ticks to nanoseconds. | |
#define | k_epoch_to_ns_ceil64(t) |
Convert epoch ticks to nanoseconds. | |
#define | k_epoch_to_ticks_floor32(t) |
Convert epoch ticks to ticks. | |
#define | k_epoch_to_ticks_floor64(t) |
Convert epoch ticks to ticks. | |
#define | k_epoch_to_ticks_near32(t) |
Convert epoch ticks to ticks. | |
#define | k_epoch_to_ticks_near64(t) |
Convert epoch ticks to ticks. | |
#define | k_epoch_to_ticks_ceil32(t) |
Convert epoch ticks to ticks. | |
#define | k_epoch_to_ticks_ceil64(t) |
Convert epoch ticks to ticks. | |
Conversion between epoch ticks and other units.
SPDX-License-Identifier: FSL-1.1-ALv2
Equivalent functionality to zephyr/sys/time_units.h
for epoch times. Generated with the script from that file.
#define k_epoch_to_ms_ceil32 | ( | t | ) |
Convert epoch ticks to milliseconds.
32 bits. Rounds up.
Converts time values in epoch ticks to milliseconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ms_ceil64 | ( | t | ) |
Convert epoch ticks to milliseconds.
64 bits. Rounds up.
Converts time values in epoch ticks to milliseconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ms_floor32 | ( | t | ) |
Convert epoch ticks to milliseconds.
32 bits. Truncates.
Converts time values in epoch ticks to milliseconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ms_floor64 | ( | t | ) |
Convert epoch ticks to milliseconds.
64 bits. Truncates.
Converts time values in epoch ticks to milliseconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ms_near32 | ( | t | ) |
Convert epoch ticks to milliseconds.
32 bits. Round nearest.
Converts time values in epoch ticks to milliseconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ms_near64 | ( | t | ) |
Convert epoch ticks to milliseconds.
64 bits. Round nearest.
Converts time values in epoch ticks to milliseconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ns_ceil32 | ( | t | ) |
Convert epoch ticks to nanoseconds.
32 bits. Rounds up.
Converts time values in epoch ticks to nanoseconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ns_ceil64 | ( | t | ) |
Convert epoch ticks to nanoseconds.
64 bits. Rounds up.
Converts time values in epoch ticks to nanoseconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ns_floor32 | ( | t | ) |
Convert epoch ticks to nanoseconds.
32 bits. Truncates.
Converts time values in epoch ticks to nanoseconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ns_floor64 | ( | t | ) |
Convert epoch ticks to nanoseconds.
64 bits. Truncates.
Converts time values in epoch ticks to nanoseconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ns_near32 | ( | t | ) |
Convert epoch ticks to nanoseconds.
32 bits. Round nearest.
Converts time values in epoch ticks to nanoseconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ns_near64 | ( | t | ) |
Convert epoch ticks to nanoseconds.
64 bits. Round nearest.
Converts time values in epoch ticks to nanoseconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_sec_ceil32 | ( | t | ) |
Convert epoch ticks to seconds.
32 bits. Rounds up.
Converts time values in epoch ticks to seconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_sec_ceil64 | ( | t | ) |
Convert epoch ticks to seconds.
64 bits. Rounds up.
Converts time values in epoch ticks to seconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_sec_floor32 | ( | t | ) |
Convert epoch ticks to seconds.
32 bits. Truncates.
Converts time values in epoch ticks to seconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_sec_floor64 | ( | t | ) |
Convert epoch ticks to seconds.
64 bits. Truncates.
Converts time values in epoch ticks to seconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_sec_near32 | ( | t | ) |
Convert epoch ticks to seconds.
32 bits. Round nearest.
Converts time values in epoch ticks to seconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_sec_near64 | ( | t | ) |
Convert epoch ticks to seconds.
64 bits. Round nearest.
Converts time values in epoch ticks to seconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ticks_ceil32 | ( | t | ) |
Convert epoch ticks to ticks.
32 bits. Rounds up.
Converts time values in epoch ticks to ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ticks_ceil64 | ( | t | ) |
Convert epoch ticks to ticks.
64 bits. Rounds up.
Converts time values in epoch ticks to ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ticks_floor32 | ( | t | ) |
Convert epoch ticks to ticks.
32 bits. Truncates.
Converts time values in epoch ticks to ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ticks_floor64 | ( | t | ) |
Convert epoch ticks to ticks.
64 bits. Truncates.
Converts time values in epoch ticks to ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ticks_near32 | ( | t | ) |
Convert epoch ticks to ticks.
32 bits. Round nearest.
Converts time values in epoch ticks to ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_ticks_near64 | ( | t | ) |
Convert epoch ticks to ticks.
64 bits. Round nearest.
Converts time values in epoch ticks to ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_us_ceil32 | ( | t | ) |
Convert epoch ticks to microseconds.
32 bits. Rounds up.
Converts time values in epoch ticks to microseconds. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_us_ceil64 | ( | t | ) |
Convert epoch ticks to microseconds.
64 bits. Rounds up.
Converts time values in epoch ticks to microseconds. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_us_floor32 | ( | t | ) |
Convert epoch ticks to microseconds.
32 bits. Truncates.
Converts time values in epoch ticks to microseconds. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_us_floor64 | ( | t | ) |
Convert epoch ticks to microseconds.
64 bits. Truncates.
Converts time values in epoch ticks to microseconds. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_us_near32 | ( | t | ) |
Convert epoch ticks to microseconds.
32 bits. Round nearest.
Converts time values in epoch ticks to microseconds. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_epoch_to_us_near64 | ( | t | ) |
Convert epoch ticks to microseconds.
64 bits. Round nearest.
Converts time values in epoch ticks to microseconds. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in epoch ticks. uint64_t |
#define k_ms_to_epoch_ceil32 | ( | t | ) |
Convert milliseconds to epoch ticks.
32 bits. Rounds up.
Converts time values in milliseconds to epoch ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in milliseconds. uint64_t |
#define k_ms_to_epoch_ceil64 | ( | t | ) |
Convert milliseconds to epoch ticks.
64 bits. Rounds up.
Converts time values in milliseconds to epoch ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in milliseconds. uint64_t |
#define k_ms_to_epoch_floor32 | ( | t | ) |
Convert milliseconds to epoch ticks.
32 bits. Truncates.
Converts time values in milliseconds to epoch ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in milliseconds. uint64_t |
#define k_ms_to_epoch_floor64 | ( | t | ) |
Convert milliseconds to epoch ticks.
64 bits. Truncates.
Converts time values in milliseconds to epoch ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in milliseconds. uint64_t |
#define k_ms_to_epoch_near32 | ( | t | ) |
Convert milliseconds to epoch ticks.
32 bits. Round nearest.
Converts time values in milliseconds to epoch ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in milliseconds. uint64_t |
#define k_ms_to_epoch_near64 | ( | t | ) |
Convert milliseconds to epoch ticks.
64 bits. Round nearest.
Converts time values in milliseconds to epoch ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in milliseconds. uint64_t |
#define k_ns_to_epoch_ceil32 | ( | t | ) |
Convert nanoseconds to epoch ticks.
32 bits. Rounds up.
Converts time values in nanoseconds to epoch ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in nanoseconds. uint64_t |
#define k_ns_to_epoch_ceil64 | ( | t | ) |
Convert nanoseconds to epoch ticks.
64 bits. Rounds up.
Converts time values in nanoseconds to epoch ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in nanoseconds. uint64_t |
#define k_ns_to_epoch_floor32 | ( | t | ) |
Convert nanoseconds to epoch ticks.
32 bits. Truncates.
Converts time values in nanoseconds to epoch ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in nanoseconds. uint64_t |
#define k_ns_to_epoch_floor64 | ( | t | ) |
Convert nanoseconds to epoch ticks.
64 bits. Truncates.
Converts time values in nanoseconds to epoch ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in nanoseconds. uint64_t |
#define k_ns_to_epoch_near32 | ( | t | ) |
Convert nanoseconds to epoch ticks.
32 bits. Round nearest.
Converts time values in nanoseconds to epoch ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in nanoseconds. uint64_t |
#define k_ns_to_epoch_near64 | ( | t | ) |
Convert nanoseconds to epoch ticks.
64 bits. Round nearest.
Converts time values in nanoseconds to epoch ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in nanoseconds. uint64_t |
#define k_sec_to_epoch_ceil32 | ( | t | ) |
Convert seconds to epoch ticks.
32 bits. Rounds up.
Converts time values in seconds to epoch ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in seconds. uint64_t |
#define k_sec_to_epoch_ceil64 | ( | t | ) |
Convert seconds to epoch ticks.
64 bits. Rounds up.
Converts time values in seconds to epoch ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in seconds. uint64_t |
#define k_sec_to_epoch_floor32 | ( | t | ) |
Convert seconds to epoch ticks.
32 bits. Truncates.
Converts time values in seconds to epoch ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in seconds. uint64_t |
#define k_sec_to_epoch_floor64 | ( | t | ) |
Convert seconds to epoch ticks.
64 bits. Truncates.
Converts time values in seconds to epoch ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in seconds. uint64_t |
#define k_sec_to_epoch_near32 | ( | t | ) |
Convert seconds to epoch ticks.
32 bits. Round nearest.
Converts time values in seconds to epoch ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in seconds. uint64_t |
#define k_sec_to_epoch_near64 | ( | t | ) |
Convert seconds to epoch ticks.
64 bits. Round nearest.
Converts time values in seconds to epoch ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in seconds. uint64_t |
#define k_ticks_to_epoch_ceil32 | ( | t | ) |
Convert ticks to epoch ticks.
32 bits. Rounds up.
Converts time values in ticks to epoch ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in ticks. uint64_t |
#define k_ticks_to_epoch_ceil64 | ( | t | ) |
Convert ticks to epoch ticks.
64 bits. Rounds up.
Converts time values in ticks to epoch ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in ticks. uint64_t |
#define k_ticks_to_epoch_floor32 | ( | t | ) |
Convert ticks to epoch ticks.
32 bits. Truncates.
Converts time values in ticks to epoch ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in ticks. uint64_t |
#define k_ticks_to_epoch_floor64 | ( | t | ) |
Convert ticks to epoch ticks.
64 bits. Truncates.
Converts time values in ticks to epoch ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in ticks. uint64_t |
#define k_ticks_to_epoch_near32 | ( | t | ) |
Convert ticks to epoch ticks.
32 bits. Round nearest.
Converts time values in ticks to epoch ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in ticks. uint64_t |
#define k_ticks_to_epoch_near64 | ( | t | ) |
Convert ticks to epoch ticks.
64 bits. Round nearest.
Converts time values in ticks to epoch ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in ticks. uint64_t |
#define k_us_to_epoch_ceil32 | ( | t | ) |
Convert microseconds to epoch ticks.
32 bits. Rounds up.
Converts time values in microseconds to epoch ticks. Computes result in 32 bit precision. Rounds up to the next highest output unit.
t | Source time in microseconds. uint64_t |
#define k_us_to_epoch_ceil64 | ( | t | ) |
Convert microseconds to epoch ticks.
64 bits. Rounds up.
Converts time values in microseconds to epoch ticks. Computes result in 64 bit precision. Rounds up to the next highest output unit.
t | Source time in microseconds. uint64_t |
#define k_us_to_epoch_floor32 | ( | t | ) |
Convert microseconds to epoch ticks.
32 bits. Truncates.
Converts time values in microseconds to epoch ticks. Computes result in 32 bit precision. Truncates to the next lowest output unit.
t | Source time in microseconds. uint64_t |
#define k_us_to_epoch_floor64 | ( | t | ) |
Convert microseconds to epoch ticks.
64 bits. Truncates.
Converts time values in microseconds to epoch ticks. Computes result in 64 bit precision. Truncates to the next lowest output unit.
t | Source time in microseconds. uint64_t |
#define k_us_to_epoch_near32 | ( | t | ) |
Convert microseconds to epoch ticks.
32 bits. Round nearest.
Converts time values in microseconds to epoch ticks. Computes result in 32 bit precision. Rounds to the nearest output unit.
t | Source time in microseconds. uint64_t |
#define k_us_to_epoch_near64 | ( | t | ) |
Convert microseconds to epoch ticks.
64 bits. Round nearest.
Converts time values in microseconds to epoch ticks. Computes result in 64 bit precision. Rounds to the nearest output unit.
t | Source time in microseconds. uint64_t |