reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
lf_unix_clock_support.h File Reference
#include <time.h>
#include <errno.h>

Go to the source code of this file.

Functions

instant_t convert_timespec_to_ns (struct timespec tp)
 Convert a _lf_time_spec_t ('tp') to an instant_t representation in nanoseconds.
 
struct timespec convert_ns_to_timespec (instant_t t)
 Convert an instant_t ('t') representation in nanoseconds to a _lf_time_spec_t.
 

Function Documentation

◆ convert_ns_to_timespec()

struct timespec convert_ns_to_timespec ( instant_t t)

Convert an instant_t ('t') representation in nanoseconds to a _lf_time_spec_t.

Returns
_lf_time_spec_t representation of 't'.

◆ convert_timespec_to_ns()

instant_t convert_timespec_to_ns ( struct timespec tp)

Convert a _lf_time_spec_t ('tp') to an instant_t representation in nanoseconds.

Returns
nanoseconds (long long).