From 2dbe76c4925e02b8ec20b986069e2ff38cea5bba Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 21 May 2014 07:38:35 +0100 Subject: sna/dri2: Tidy computation of 64bit ust Signed-off-by: Chris Wilson --- src/sna/sna.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/sna/sna.h') diff --git a/src/sna/sna.h b/src/sna/sna.h index 8cfa98a9..a5141811 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -463,6 +463,11 @@ extern xf86CrtcPtr sna_covering_crtc(struct sna *sna, extern bool sna_wait_for_scanline(struct sna *sna, PixmapPtr pixmap, xf86CrtcPtr crtc, const BoxRec *clip); +static inline uint64_t ust64(int tv_sec, int tv_usec) +{ + return (uint64_t)tv_sec * 1000000 + tv_usec; +} + #if HAVE_DRI2_H bool sna_dri2_open(struct sna *sna, ScreenPtr pScreen); void sna_dri2_page_flip_handler(struct sna *sna, struct drm_event_vblank *event); -- cgit v1.2.3