From 9ef4282e9e32e857f4d0cac9df6d58f2cba159f4 Mon Sep 17 00:00:00 2001 From: reinelt Date: Wed, 3 Mar 2004 03:47:04 +0000 Subject: [lcd4linux @ 2004-03-03 03:47:04 by reinelt] big patch from Martin Hejl: - use qprintf() where appropriate - save CPU cycles on gettimeofday() - add quit() functions to free allocated memory - fixed lots of memory leaks git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@384 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- timer.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'timer.c') diff --git a/timer.c b/timer.c index 241aa4d..262a543 100644 --- a/timer.c +++ b/timer.c @@ -1,4 +1,4 @@ -/* $Id: timer.c,v 1.4 2004/01/30 20:57:56 reinelt Exp $ +/* $Id: timer.c,v 1.5 2004/03/03 03:47:04 reinelt Exp $ * * generic timer handling * @@ -21,6 +21,13 @@ * * * $Log: timer.c,v $ + * Revision 1.5 2004/03/03 03:47:04 reinelt + * big patch from Martin Hejl: + * - use qprintf() where appropriate + * - save CPU cycles on gettimeofday() + * - add quit() functions to free allocated memory + * - fixed lots of memory leaks + * * Revision 1.4 2004/01/30 20:57:56 reinelt * HD44780 patch from Martin Hejl * dmalloc integrated @@ -187,3 +194,10 @@ int timer_process (struct timespec *delay) return 0; } + +void timer_exit() { + if (nTimers>0) { + nTimers=0; + free(Timers);; + } +} -- cgit v1.2.3