summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-13 11:20:04 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-13 11:20:04 +0800
commit6a428fb60d8ec6092d428b2e0f869a31f4890dc7 (patch)
treea0671ea2dc0168a9cb5625f867d553f6d0441efc /mbbsd/cache.c
parent438c456b95eec0e5ac662ca3cf2386dff2c44bc7 (diff)
downloadpttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.gz
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.bz2
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.lz
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.xz
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.tar.zst
pttbbs-6a428fb60d8ec6092d428b2e0f869a31f4890dc7.zip
replace time(NULL) by now
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@163 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index fef81942..a2d1c98a 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -1,4 +1,4 @@
-/* $Id: cache.c,v 1.22 2002/05/04 13:50:26 in2 Exp $ */
+/* $Id: cache.c,v 1.23 2002/05/13 03:20:04 ptt Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -34,7 +34,7 @@ union semun {
struct seminfo *__buf; /* buffer for IPC_INFO */
};
#endif
-
+extern time_t now;
int fcache_semid;
/* the reason for "safe_sleep" is that we may call sleep during
@@ -330,7 +330,6 @@ void setutmpmode(int mode) {
/* °lÂÜ¨Ï¥ÎªÌ */
if(HAS_PERM(PERM_LOGUSER)) {
- time_t now = time(NULL);
char msg[200];
sprintf(msg, "%s setutmpmode to %s(%d) at %s",
cuser.userid, modestring(currutmp, 0), mode, Cdate(&now));
@@ -377,7 +376,6 @@ static int cmputmpuid(const void *i, const void *j){
}
void sort_utmp()
{
- time_t now=time(NULL);
int count, i, ns;
userinfo_t *uentp;
@@ -673,7 +671,7 @@ void resolve_boards() {
}
void touch_boards() {
- time(&(brdshm->touchtime));
+ brdshm->touchtime=now;
numboards = -1;
resolve_boards();
}
@@ -1016,7 +1014,7 @@ void hbflreload(int bid)
}
fclose(fp);
}
- hbfl[0] = time(NULL);
+ hbfl[0] = now;
memcpy(brdshm->hbfl[bid], hbfl, sizeof(hbfl));
}