Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
ca821x-posix-util-internal.h File Reference

Callbacks for internal evbme handling. More...

#include <time.h>
Include dependency graph for ca821x-posix-util-internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct timespec time_sub (const struct timespec *t1, const struct timespec *t2)
 Subtract one timespec from another. More...
 
int time_cmp (const struct timespec *t1, const struct timespec *t2)
 Compare two timespec structures. More...
 

Detailed Description

Callbacks for internal evbme handling.

Function Documentation

◆ time_cmp()

int time_cmp ( const struct timespec *  t1,
const struct timespec *  t2 
)

Compare two timespec structures.

Parameters
t1first timespec
t2second timespec
Returns
0 if equal, 1 if t1 > t2, -1 if t1 < t2

◆ time_sub()

struct timespec time_sub ( const struct timespec *  t1,
const struct timespec *  t2 
)

Subtract one timespec from another.

Parameters
t1timespec 1
t2timespec 2
Returns
The difference between t1 and t2