Page Generation Time

This commit is contained in:
Bingus_Violet 2024-01-27 12:14:20 -06:00
parent 9efde97690
commit e6d3ab50bb
2 changed files with 6 additions and 0 deletions

View file

@ -65,6 +65,9 @@ function gameTimeFormatter(seconds) {
}
function pageUpdate() {
var genStart = Date.now()
var statuses = {
"online": {
"text": "Online",
@ -348,6 +351,8 @@ function pageUpdate() {
html = html.replace("{LAST_LANYARD}", gameTimeFormatter((Date.now() - lastLanyardUpdate) / 1000) + ' ago')
html = html.replace("{QUOTE_COUNT}", randomQuotes.length)
html = html.replace("{GENERATION_TIME}", (Date.now() - genStart).toString() + 'ms')
//fs.writeFileSync(path.join(__dirname, 'static/index.html'), html)
return html
}

View file

@ -67,6 +67,7 @@
<li>Uptime: {UPTIME}</li>
<li>Last Lanyard Update: {LAST_LANYARD}</li>
<li>Quotes: {QUOTE_COUNT}</li>
<li>Page Generation Time: {GENERATION_TIME}</li>
</ul>
{SOCIALS}