summaryrefslogtreecommitdiffstats
path: root/mbbsd/stuff.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-15 13:09:29 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-15 13:09:29 +0800
commit1747fb8d710780e60d9af73723da21a80197137b (patch)
tree678496b7171e6be25ab5be9a6dc25e7925a444b2 /mbbsd/stuff.c
parent1680a267a8c73a0e433c67ef7ba89bc60e0e4574 (diff)
downloadpttbbs-1747fb8d710780e60d9af73723da21a80197137b.tar
pttbbs-1747fb8d710780e60d9af73723da21a80197137b.tar.gz
pttbbs-1747fb8d710780e60d9af73723da21a80197137b.tar.bz2
pttbbs-1747fb8d710780e60d9af73723da21a80197137b.tar.lz
pttbbs-1747fb8d710780e60d9af73723da21a80197137b.tar.xz
pttbbs-1747fb8d710780e60d9af73723da21a80197137b.tar.zst
pttbbs-1747fb8d710780e60d9af73723da21a80197137b.zip
- unify processing clock variable 'now'
- pmore: support time refresh git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3683 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r--mbbsd/stuff.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index abe65680..e7cbaf34 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -238,6 +238,17 @@ gettime(int line, time4_t dt, const char*head)
} while ((endtime.tm_hour = atoi(yn)) < 0 || endtime.tm_hour > 23);
return mktime(&endtime);
}
+
+// synchronize 'now'
+void syncnow(void)
+{
+#ifdef OUTTA_TIMER
+ now = SHM->GV2.e.now;
+#else
+ now = time(0);
+#endif
+}
+
#endif