mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-21 06:46:46 -04:00
util/time: add timespec_add()
This commit is contained in:
parent
293d78777d
commit
639bacdb9a
2 changed files with 22 additions and 4 deletions
|
|
@ -23,6 +23,12 @@ int64_t timespec_to_nsec(const struct timespec *t);
|
|||
*/
|
||||
void timespec_from_nsec(struct timespec *r, int64_t nsec);
|
||||
|
||||
/**
|
||||
* Add two timespec values `a` and `b`, and store the result in `r`.
|
||||
*/
|
||||
void timespec_add(struct timespec *r, const struct timespec *a,
|
||||
const struct timespec *b);
|
||||
|
||||
/**
|
||||
* Subtracts timespec `b` from timespec `a`, and stores the difference in `r`.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue