[Mesa-dev] [PATCH 1/4] winsys/radeon: Add a millisecond time function

Lauri Kasanen cand at gmx.com
Wed Jan 1 06:57:01 PST 2014


Signed-off-by: Lauri Kasanen <cand at gmx.com>
---
 src/gallium/winsys/radeon/drm/radeon_drm_bo.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.h b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h
index 5536bc1..0f7e1f0 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.h
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.h
@@ -35,6 +35,7 @@
 #include "radeon_drm_winsys.h"
 #include "pipebuffer/pb_bufmgr.h"
 #include "os/os_thread.h"
+#include "os/os_time.h"
 
 struct radeon_bomgr;
 
@@ -80,4 +81,8 @@ void radeon_bo_reference(struct radeon_bo **dst, struct radeon_bo *src)
 
 void *radeon_bo_do_map(struct radeon_bo *bo);
 
+static INLINE unsigned long long stats_time_get() {
+    return os_time_get_nano() / 1000000;
+}
+
 #endif
-- 
1.8.3.1



More information about the mesa-dev mailing list