summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2005-01-27 17:31:12 +0000
committerlordjaxom <lordjaxom>2005-01-27 17:31:12 +0000
commit0e277b89bd336eede90215ec6485df968e4954c4 (patch)
tree433aa1bf8dd9f0c3559e1efc4f82d3c5c90d14b1
parentb00631bec3e64d9a288e3a0e70c4c49cf0a9f457 (diff)
downloadvdr-plugin-text2skin-0e277b89bd336eede90215ec6485df968e4954c4.tar.gz
vdr-plugin-text2skin-0e277b89bd336eede90215ec6485df968e4954c4.tar.bz2
- implemented BENCH make option
-rw-r--r--common.h18
-rw-r--r--render.c6
2 files changed, 14 insertions, 10 deletions
diff --git a/common.h b/common.h
index e453486..a86dc81 100644
--- a/common.h
+++ b/common.h
@@ -1,5 +1,5 @@
/*
- * $Id: common.h,v 1.3 2005/01/02 19:54:22 lordjaxom Exp $
+ * $Id: common.h,v 1.4 2005/01/27 17:31:12 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_COMMON_H
@@ -10,18 +10,22 @@
#include <vdr/osd.h>
#include <vdr/config.h>
-#ifdef DEBUG
-# define Dprintf(x...) fprintf(stderr, x);
-# define Dbench(x) uint64 bench_##x = time_ms();
-# define Ddiff(x) time_ms() - bench_##x
+#if defined(DEBUG) || defined(BENCH)
+# ifdef DEBUG
+# define Dprintf(x...) fprintf(stderr, x)
+# else
+# define Dprintf(x...)
+# endif
+# define Dbench(x) uint64 bench_##x = time_ms()
+# define Ddiff(t,x) fprintf(stderr, "%s took %llu ms\n", t, time_ms() - bench_##x)
#else
# define Dprintf(x...)
# define Dbench(x)
-# define Ddiff(x)
+# define Ddiff(t,x)
#endif
#if VDRVERSNUM >= 10318
-# define time_ms() cTimeMs().Now()
+# define time_ms() cTimeMs::Now()
# define Apid1() Apid(0)
# define Apid2() Apid(1)
# define Dpid1() Dpid(0)
diff --git a/render.c b/render.c
index 548b776..3d3b4d7 100644
--- a/render.c
+++ b/render.c
@@ -1,5 +1,5 @@
/*
- * $Id: render.c,v 1.28 2005/01/26 20:42:41 lordjaxom Exp $
+ * $Id: render.c,v 1.29 2005/01/27 17:31:12 lordjaxom Exp $
*/
#include "render.h"
@@ -152,8 +152,8 @@ void cText2SkinRender::Update(void)
Dbench(flush);
mScreen->Flush();
- Dprintf("flush only took %llu ms\n", Ddiff(flush));
- Dprintf("complete flush took %llu ms\n", Ddiff(update));
+ Ddiff("flush only", flush);
+ Ddiff("complete flush", update);
}
void cText2SkinRender::DrawObject(const cxObject *Object)