summaryrefslogtreecommitdiffstats
path: root/meta/packages/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch')
-rwxr-xr-xmeta/packages/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/packages/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch b/meta/packages/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
new file mode 100755
index 0000000000..8e4033e9a3
--- /dev/null
+++ b/meta/packages/xorg-xserver/xserver-xf86-dri-lite/xserver-boottime.patch
@@ -0,0 +1,37 @@
1diff --git a/os/log.c b/os/log.c
2index 0860847..2c46f1a 100644
3--- a/os/log.c
4+++ b/os/log.c
5@@ -255,6 +255,32 @@ LogVWrite(int verb, const char *f, va_list args)
6 static char tmpBuffer[1024];
7 int len = 0;
8
9+ struct timeval time;
10+ time_t tv_sec;
11+ suseconds_t tv_usec;
12+ static Bool first = TRUE;
13+ static time_t start_tv_sec;
14+ static suseconds_t start_usec;
15+ int diff_sec, diff_usec;
16+
17+ gettimeofday(&time, NULL);
18+ tv_sec = time.tv_sec;
19+ tv_usec = time.tv_usec;
20+ if (first == TRUE) {
21+ start_tv_sec = tv_sec;
22+ start_usec = tv_usec;
23+ first = FALSE;
24+ }
25+ diff_sec = (int)difftime(tv_sec, start_tv_sec);
26+ diff_usec = (tv_usec - start_usec);
27+ if (diff_usec < 0) {
28+ diff_sec--;
29+ diff_usec += 1000000;
30+ }
31+ sprintf(tmpBuffer, "[%d sec: %06d usec]", diff_sec , diff_usec);
32+ len = strlen(tmpBuffer);
33+ fwrite(tmpBuffer, len, 1, logFile);
34+
35 /*
36 * Since a va_list can only be processed once, write the string to a
37 * buffer, and then write the buffer out to the appropriate output