#include <stdint.h>
#include <time.h>
Go to the source code of this file.
|
int | lrtr_get_monotonic_time (time_t *seconds) |
| Returns the current time of the CLOCK_MONOTONIC clock.
|
|
uint32_t | lrtr_get_bits (const uint32_t val, const uint8_t from, const uint8_t number) |
| Extracts number bits from the passed uint32_t, starting at bit number from.
|
|
◆ lrtr_get_bits()
uint32_t lrtr_get_bits |
( |
const uint32_t |
val, |
|
|
const uint8_t |
from, |
|
|
const uint8_t |
number |
|
) |
| |
Extracts number bits from the passed uint32_t, starting at bit number from.
The bit with the highest significance is bit 0. All bits that aren't in the specified range will be 0.
- Parameters
-
[in] | val | uint32_t |
[in] | from | Position of the first bit that is extracted. |
[in] | number | How many bits will be extracted. |
- Returns
- a uint32_t, where all bits that aren't in the specified range are set to 0.
◆ lrtr_get_monotonic_time()
int lrtr_get_monotonic_time |
( |
time_t * |
seconds | ) |
|
Returns the current time of the CLOCK_MONOTONIC clock.
- Parameters
-
[in] | seconds | Time in seconds since some unspecified starting point. |
- Returns
- 0 on successs
-
-1 on error