summaryrefslogtreecommitdiff
path: root/frontends/monkey
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-07 15:30:08 +0100
committerVincent Sanders <vince@kyllikki.org>2017-09-07 15:30:08 +0100
commitb9bdc279f228c6e70d05c85361fe7d018beba444 (patch)
tree644d6f0ba58b3c977f01ccb73a4143be24ec1309 /frontends/monkey
parentb346790cf67d5bda40ed06c035f02d0af414361a (diff)
downloadnetsurf-b9bdc279f228c6e70d05c85361fe7d018beba444.tar.gz
netsurf-b9bdc279f228c6e70d05c85361fe7d018beba444.tar.bz2
Update scheduler logging to use catagory
Diffstat (limited to 'frontends/monkey')
-rw-r--r--frontends/monkey/schedule.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/frontends/monkey/schedule.c b/frontends/monkey/schedule.c
index b34bd5aa5..d3e442a06 100644
--- a/frontends/monkey/schedule.c
+++ b/frontends/monkey/schedule.c
@@ -24,12 +24,6 @@
#include "monkey/schedule.h"
-#ifdef DEBUG_SCHEDULER
-#define SRLOG(x...) LOG(x)
-#else
-#define SRLOG(x...) ((void) 0)
-#endif
-
/* linked list of scheduled callbacks */
static struct nscallback *schedule_list = NULL;
@@ -63,7 +57,7 @@ static nserror schedule_remove(void (*callback)(void *p), void *p)
return NSERROR_OK;
}
- SRLOG("removing %p, %p", callback, p);
+ NSLOG(schedule, DEBUG, "removing %p, %p", callback, p);
cur_nscb = schedule_list;
prev_nscb = NULL;
@@ -73,7 +67,7 @@ static nserror schedule_remove(void (*callback)(void *p), void *p)
(cur_nscb->p == p)) {
/* item to remove */
- SRLOG("callback entry %p removing %p(%p)",
+ NSLOG(schedule, DEBUG, "callback entry %p removing %p(%p)",
cur_nscb, cur_nscb->callback, cur_nscb->p);
/* remove callback */
@@ -109,7 +103,7 @@ nserror monkey_schedule(int tival, void (*callback)(void *p), void *p)
return ret;
}
- SRLOG("Adding %p(%p) in %d", callback, p, tival);
+ NSLOG(schedule, DEBUG, "Adding %p(%p) in %d", callback, p, tival);
tv.tv_sec = tival / 1000; /* miliseconds to seconds */
tv.tv_usec = (tival % 1000) * 1000; /* remainder to microseconds */
@@ -190,7 +184,7 @@ int monkey_schedule_run(void)
/* make rettime relative to now */
timersub(&nexttime, &tv, &rettime);
- SRLOG("returning time to next event as %ldms",
+ NSLOG(schedule, DEBUG, "returning time to next event as %ldms",
(rettime.tv_sec * 1000) + (rettime.tv_usec / 1000));
/* return next event time in milliseconds (24days max wait) */