mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 15:45:54 +00:00
Three blocking functions, one was split to leave the display channel specific referencing of the DrawablePipeItem being sent inside red_worker, but the rest (most) of the timeout logic was moved to red_channel, including the associated constants. Moved functions: red_channel_client_wait_pipe_item_sent red_wait_outgoing_item red_wait_all_sent Introduces red_time.h & red_time.c for a small helper function dealing with time.h
16 lines
243 B
C
16 lines
243 B
C
#ifndef H_RED_TIME
|
|
#define H_RED_TIME
|
|
|
|
#include <time.h>
|
|
|
|
static inline uint64_t red_now(void)
|
|
{
|
|
struct timespec time;
|
|
|
|
clock_gettime(CLOCK_MONOTONIC, &time);
|
|
|
|
return ((uint64_t) time.tv_sec) * 1000000000 + time.tv_nsec;
|
|
}
|
|
|
|
#endif
|