diff --git a/lib/timer.c b/lib/timer.c
index c47e0bbc8b78d9797a61754b612cd1ee1df12bf3..92da5061d6de9a56c131404ae460ee37e68671fa 100644
--- a/lib/timer.c
+++ b/lib/timer.c
@@ -110,9 +110,9 @@ tm_dump(resource *r)
   if (t->randomize)
     debug("rand %d, ", t->randomize);
   if (t->recurrent)
-    debug("recur %d, ", t->recurrent);
+    debug("recur %ld, ", t->recurrent);
   if (t->expires)
-    debug("expires in %d ms)\n", (t->expires - current_time()) TO_MS);
+    debug("expires in %ld ms)\n", (t->expires - current_time()) TO_MS);
   else
     debug("inactive)\n");
 }
diff --git a/lib/timer.h b/lib/timer.h
index 0f87852bd6d38cb0ff0ee24acfe0eef12828fc09..83ce34aaf446947c4dfc94be155cbe791ad14603 100644
--- a/lib/timer.h
+++ b/lib/timer.h
@@ -22,8 +22,8 @@ typedef struct timer
   void *data;
 
   btime expires;			/* 0=inactive */
+  btime recurrent;			/* Timer recurrence */
   uint randomize;			/* Amount of randomization */
-  uint recurrent;			/* Timer recurrence */
 
   int index;
 } timer;
@@ -72,7 +72,7 @@ tm_remains(timer *t)
 }
 
 static inline timer *
-tm_new_init(pool *p, void (*hook)(struct timer *), void *data, uint rec, uint rand)
+tm_new_init(pool *p, void (*hook)(struct timer *), void *data, btime rec, uint rand)
 {
   timer *t = tm_new(p);
   t->hook = hook;