diff options
author | lordjaxom <lordjaxom> | 2005-01-27 17:31:12 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2005-01-27 17:31:12 +0000 |
commit | 0e277b89bd336eede90215ec6485df968e4954c4 (patch) | |
tree | 433aa1bf8dd9f0c3559e1efc4f82d3c5c90d14b1 | |
parent | b00631bec3e64d9a288e3a0e70c4c49cf0a9f457 (diff) | |
download | vdr-plugin-text2skin-0e277b89bd336eede90215ec6485df968e4954c4.tar.gz vdr-plugin-text2skin-0e277b89bd336eede90215ec6485df968e4954c4.tar.bz2 |
- implemented BENCH make option
-rw-r--r-- | common.h | 18 | ||||
-rw-r--r-- | render.c | 6 |
2 files changed, 14 insertions, 10 deletions
@@ -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) @@ -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) |