add timespec_empty()
This commit is contained in:
@ -216,6 +216,14 @@ bool timespec_clear_spec(struct mgos_timespec *ts) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Return true if the timespec is empty
|
||||
bool timespec_empty(struct mgos_timespec *ts) {
|
||||
if (!ts) {
|
||||
return true;
|
||||
}
|
||||
return SLIST_EMPTY(&ts->specs);
|
||||
}
|
||||
|
||||
// Return a null terminated string in 'ret' of max retlen-1 which is a
|
||||
// comma separated set of timespec elements from the linked list.
|
||||
// Returns true on success, false otherwise.
|
||||
|
Reference in New Issue
Block a user