mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-03 01:41:10 -05:00
Merge branch 'commit_timing_v1' into 'master'
commit-timing-v1: new protocol implementation See merge request wlroots/wlroots!4617
This commit is contained in:
commit
d04d3dce4d
9 changed files with 575 additions and 0 deletions
|
|
@ -22,6 +22,12 @@ int64_t get_current_time_msec(void) {
|
|||
return timespec_to_msec(&now);
|
||||
}
|
||||
|
||||
int64_t get_current_time_nsec(void) {
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
return timespec_to_nsec(&now);
|
||||
}
|
||||
|
||||
void timespec_sub(struct timespec *r, const struct timespec *a,
|
||||
const struct timespec *b) {
|
||||
r->tv_sec = a->tv_sec - b->tv_sec;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue