Commit 8befbc4f authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(garb_text): Use current_time instead of calling time().

parent 878f8af7
/*
* $Id: text-garb.c,v 0.26 1999/05/12 13:25:37 byers Exp $
* $Id: text-garb.c,v 0.27 1999/05/16 21:47:18 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -34,7 +34,7 @@
#endif
static const char *
rcsid = "$Id: text-garb.c,v 0.26 1999/05/12 13:25:37 byers Exp $";
rcsid = "$Id: text-garb.c,v 0.27 1999/05/16 21:47:18 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -56,6 +56,7 @@ USE(rcsid);
#include "log.h"
#include "internal-services.h"
#include "param.h"
#include "server-time.h"
BUGDECL;
......@@ -119,13 +120,13 @@ garb_text(void)
if ( last_checked == 0 )
{
if ( last_start != NO_TIME
&& ldifftime(time(NULL), last_start) < param.garb_interval * 60 )
&& ldifftime(current_time, last_start) < param.garb_interval * 60 )
{
return TRUE;
}
kom_log("MSG: garb started.\n");
time( &last_start );
last_start = current_time;
}
tell_cache_garb_text(1);
......@@ -146,7 +147,7 @@ garb_text(void)
return FALSE;
}
age = ldifftime( time(NULL), text_s->creation_time );
age = ldifftime(current_time, text_s->creation_time );
if ( text_s->no_of_marks > 0 || age < 24 * 3600 )
{
......@@ -224,8 +225,7 @@ garb_text(void)
break;
case sent_at:
if ( ldifftime ( time(NULL), misc->datum.sent_at )
< limit )
if (ldifftime(current_time, misc->datum.sent_at) < limit)
{
tell_cache_garb_text(0);
return FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment