https://gitlab.synchro.net/main/sbbs/-/commit/286b4c4cd08f97ee1067aa1c
Modified Files:
src/sbbs3/atcodes.cpp getstats.c getstats.h js_system.cpp logon.cpp sbbs.h sbbsdefs.h
Log Message:
Cache system stats for @-code expansion and JS system.stats properties
... for a default duration of 5 seconds (tunable via new property: system.stats_cache, in seconds, use negative values for "no caching").
This will make display files with @-codes a reasonable replacement for a few hard-coded stats display functions (no long reading the stats file for *every* stats-related @-code) and reduce disk I/O from ecWebv4.
One thing that came up from this was the need to use 32-bit time_t's in the stats_t for interoperability with sbbsctrl-win32 (built with Borland C++). Through some magic of structure element alignment/padding, the stats_t was interoperabile before with the 64-bit time_t in there (interpretted as 32-bit by Borland), but after adding a second time_t for the last read time, that broke the compatibility for sure and we needed to move to 32-bit time_t's (which they should've been before anyway).
--- SBBSecho 3.34-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)