From cc2971f56db600a3711d8450a1eb237223fac966 Mon Sep 17 00:00:00 2001 From: thib Date: Thu, 22 Jun 2000 12:31:57 +0000 Subject: [PATCH] time_to_sleep don't use global variable "now" anymore : it calls itself time() --- database.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/database.c b/database.c index e5e39dd..4b5070d 100644 --- a/database.c +++ b/database.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: database.c,v 1.15 2000-06-21 14:58:44 thib Exp $ */ + /* $Id: database.c,v 1.16 2000-06-22 12:31:57 thib Exp $ */ #include "fcron.h" @@ -100,15 +100,6 @@ add_serial_job(CL *line) } - else { - /* job is already in serial queue : advance his execution */ - - /////////////// - // Put the corresponding code - ////////////// - - } - } @@ -551,13 +542,14 @@ time_to_sleep(time_t lim) /* we set tts to a big value, unless some problems can occurs * with files without any line */ time_t tts = lim; + time_t ti = time(NULL); if ( queue_base != NULL ) { if ( queue_base->j_line->cl_nextexe < lim ) tts = queue_base->j_line->cl_nextexe; } - if ( (tts = tts - now) < 0) + if ( (tts = tts - ti) < 0) tts = 0; debug("Time to sleep: %lds", tts); -- 2.40.0