[teklib-general] teklib: More display modules adapted to new timing functions and...

Timm S. Mueller tmueller at neoscientists.org
Wed Jan 14 13:36:43 CET 2009


details:   http://hg.teklib.org/teklib/rev/90c8c05d5027
changeset: 228:90c8c05d5027
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Tue Jan 13 18:45:10 2009 +0100
description:
More display modules adapted to new timing functions and datatypes

diffs (truncated from 113 to 100 lines):

diff -r 7525cc225098 -r 90c8c05d5027 src/display_directfb/display_dfb_mod.c
--- a/src/display_directfb/display_dfb_mod.c	Tue Jan 13 17:37:30 2009 +0100
+++ b/src/display_directfb/display_dfb_mod.c	Tue Jan 13 18:45:10 2009 +0100
@@ -529,12 +529,12 @@
 	struct TNode *node, *next;
 
 	/* interval time: 1/50s: */
-	TTIME intt = { 0, 20000 };
+	TTIME intt = { 20000 };
 	/* next absolute time to send interval message: */
 	TTIME nextt;
 	TTIME waitt, nowt;
 
-	TExecQueryTime(inst->dfb_ExecBase, inst->dfb_TimeReq, &nextt);
+	TExecGetSystemTime(inst->dfb_ExecBase, inst->dfb_TimeReq, &nextt);
 	TExecAddTime(inst->dfb_ExecBase, &nextt, &intt);
 
 	TDBPRINTF(TDB_ERROR,("Device instance running\n"));
@@ -561,12 +561,12 @@
 		FD_SET(inst->dfb_FDSigPipeRead, &rset);
 
 		/* calculate new delta to wait: */
-		TExecQueryTime(inst->dfb_ExecBase, inst->dfb_TimeReq, &nowt);
+		TExecGetSystemTime(inst->dfb_ExecBase, inst->dfb_TimeReq, &nowt);
 		waitt = nextt;
 		TExecSubTime(inst->dfb_ExecBase, &waitt, &nowt);
 
-		tv.tv_sec = waitt.ttm_Sec;
-		tv.tv_usec = waitt.ttm_USec;
+		tv.tv_sec = waitt.tdt_Int64 / 1000000;
+		tv.tv_usec = waitt.tdt_Int64 % 1000000;
 
 		/* wait for display, signal fd and timeout: */
 		if (select(inst->dfb_FDMax, &rset, NULL, NULL, &tv) > 0)
@@ -586,7 +586,7 @@
 		}
 
 		/* check if time interval has expired: */
-		TExecQueryTime(inst->dfb_ExecBase, inst->dfb_TimeReq, &nowt);
+		TExecGetSystemTime(inst->dfb_ExecBase, inst->dfb_TimeReq, &nowt);
 		if (TExecCmpTime(inst->dfb_ExecBase, &nowt, &nextt) > 0)
 		{
 			/* expired; send interval: */
@@ -991,7 +991,7 @@
 		msg->timsg_Qualifier = mod->dfb_KeyQual;
 		msg->timsg_MouseX = mod->dfb_MouseX;
 		msg->timsg_MouseY = mod->dfb_MouseY;
-		TExecQueryTime(mod->dfb_ExecBase, mod->dfb_TimeReq, &msg->timsg_TimeStamp);
+		TExecGetSystemTime(mod->dfb_ExecBase, mod->dfb_TimeReq, &msg->timsg_TimeStamp);
 		*msgptr = msg;
 		return TTRUE;
 	}
diff -r 7525cc225098 -r 90c8c05d5027 src/display_rawfb/display_fb_mod.c
--- a/src/display_rawfb/display_fb_mod.c	Tue Jan 13 17:37:30 2009 +0100
+++ b/src/display_rawfb/display_fb_mod.c	Tue Jan 13 18:45:10 2009 +0100
@@ -439,12 +439,12 @@
 	TUINT sig;
 
 	/* interval time: 1/50s: */
-	TTIME intt = { 0, 20000 };
+	TTIME intt = { 20000 };
 	/* next absolute time to send interval message: */
 	TTIME nextt;
 	TTIME waitt, nowt;
 
-	TExecQueryTime(inst->fbd_ExecBase, inst->fbd_TimeReq, &nextt);
+	TExecGetSystemTime(inst->fbd_ExecBase, inst->fbd_TimeReq, &nextt);
 	TExecAddTime(inst->fbd_ExecBase, &nextt, &intt);
 
 	TDBPRINTF(TDB_INFO,("Device instance running\n"));
@@ -460,7 +460,7 @@
 		}
 
 		/* calculate new delta to wait: */
-		TExecQueryTime(inst->fbd_ExecBase, inst->fbd_TimeReq, &nowt);
+		TExecGetSystemTime(inst->fbd_ExecBase, inst->fbd_TimeReq, &nowt);
 		waitt = nextt;
 		TExecSubTime(inst->fbd_ExecBase, &waitt, &nowt);
 
@@ -478,7 +478,7 @@
 		#endif
 
 		/* check if time interval has expired: */
-		TExecQueryTime(inst->fbd_ExecBase, inst->fbd_TimeReq, &nowt);
+		TExecGetSystemTime(inst->fbd_ExecBase, inst->fbd_TimeReq, &nowt);
 		if (TExecCmpTime(inst->fbd_ExecBase, &nowt, &nextt) > 0)
 		{
 			/* expired; send interval: */
@@ -518,7 +518,7 @@
 		msg->timsg_Qualifier = mod->fbd_KeyQual;
 		msg->timsg_MouseX = mod->fbd_MouseX;
 		msg->timsg_MouseY = mod->fbd_MouseY;
-		TExecQueryTime(mod->fbd_ExecBase, mod->fbd_TimeReq,
+		TExecGetSystemTime(mod->fbd_ExecBase, mod->fbd_TimeReq,
 			&msg->timsg_TimeStamp);
 		*msgptr = msg;
 		return TTRUE;
diff -r 7525cc225098 -r 90c8c05d5027 src/hal/posix/hal.c
--- a/src/hal/posix/hal.c	Tue Jan 13 17:37:30 2009 +0100
+++ b/src/hal/posix/hal.c	Tue Jan 13 18:45:10 2009 +0100


More information about the teklib-general mailing list