summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-03-18 19:11:20 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-03-18 19:11:20 +0100
commite0893410a5131f351f1393644f2f48227490bd6e (patch)
tree0a7d58d826c51d773fb0d8b241653b72f31a7772 /src
parent70284a4ff2a28e1601f4390a01278ea900198bdd (diff)
downloadbabel-e0893410a5131f351f1393644f2f48227490bd6e.tar
babel-e0893410a5131f351f1393644f2f48227490bd6e.zip
Add periodic task
Diffstat (limited to 'src')
-rw-r--r--src/core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index 2dd4927..71ea186 100644
--- a/src/core.c
+++ b/src/core.c
@@ -30,7 +30,18 @@
const char *gmrf_protocol_name = "babel";
const char *gmrf_protocol_version = "experimental";
+
+static void periodic_task(gmrf_t *gmrf, gmrf_context_t *ctx, void *arg) {
+ gmrf_logf(gmrf, LOG_DEBUG, "still there.");
+
+ gmrf_schedule(gmrf, periodic_task, NULL, 1000);
+}
+
gmrf_context_t* gmrf_protocol_init(gmrf_t *gmrf) {
+ gmrf_logf(gmrf, LOG_INFO, "initalizing...");
+
+ gmrf_schedule(gmrf, periodic_task, NULL, 1000);
+
return NULL;
}