|
|
|
@ -8,6 +8,7 @@
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
#include <wayland-server-core.h>
|
|
|
|
|
#include <wlr/util/log.h>
|
|
|
|
|
#include "util/time.h"
|
|
|
|
|
|
|
|
|
|
static bool colored = true;
|
|
|
|
|
static enum wlr_log_importance log_importance = WLR_ERROR;
|
|
|
|
@ -27,17 +28,6 @@ static const char *verbosity_headers[] = {
|
|
|
|
|
[WLR_DEBUG] = "[DEBUG]",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static void timespec_sub(struct timespec *r, const struct timespec *a,
|
|
|
|
|
const struct timespec *b) {
|
|
|
|
|
const long NSEC_PER_SEC = 1000000000;
|
|
|
|
|
r->tv_sec = a->tv_sec - b->tv_sec;
|
|
|
|
|
r->tv_nsec = a->tv_nsec - b->tv_nsec;
|
|
|
|
|
if (r->tv_nsec < 0) {
|
|
|
|
|
r->tv_sec--;
|
|
|
|
|
r->tv_nsec += NSEC_PER_SEC;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void init_start_time(void) {
|
|
|
|
|
if (start_time.tv_sec >= 0) {
|
|
|
|
|
return;
|
|
|
|
|