Page Generation Time
This commit is contained in:
parent
9efde97690
commit
e6d3ab50bb
2 changed files with 6 additions and 0 deletions
5
index.js
5
index.js
|
@ -65,6 +65,9 @@ function gameTimeFormatter(seconds) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function pageUpdate() {
|
function pageUpdate() {
|
||||||
|
|
||||||
|
var genStart = Date.now()
|
||||||
|
|
||||||
var statuses = {
|
var statuses = {
|
||||||
"online": {
|
"online": {
|
||||||
"text": "Online",
|
"text": "Online",
|
||||||
|
@ -348,6 +351,8 @@ function pageUpdate() {
|
||||||
html = html.replace("{LAST_LANYARD}", gameTimeFormatter((Date.now() - lastLanyardUpdate) / 1000) + ' ago')
|
html = html.replace("{LAST_LANYARD}", gameTimeFormatter((Date.now() - lastLanyardUpdate) / 1000) + ' ago')
|
||||||
html = html.replace("{QUOTE_COUNT}", randomQuotes.length)
|
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)
|
//fs.writeFileSync(path.join(__dirname, 'static/index.html'), html)
|
||||||
return html
|
return html
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
<li>Uptime: {UPTIME}</li>
|
<li>Uptime: {UPTIME}</li>
|
||||||
<li>Last Lanyard Update: {LAST_LANYARD}</li>
|
<li>Last Lanyard Update: {LAST_LANYARD}</li>
|
||||||
<li>Quotes: {QUOTE_COUNT}</li>
|
<li>Quotes: {QUOTE_COUNT}</li>
|
||||||
|
<li>Page Generation Time: {GENERATION_TIME}</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{SOCIALS}
|
{SOCIALS}
|
||||||
|
|
Loading…
Reference in a new issue