🔃 Sync hub 2.0.1 #788

This commit is contained in:
jokob-sk
2024-09-18 08:48:08 +10:00
parent e9e45c34ae
commit d2fe53bc81
3 changed files with 148 additions and 129 deletions

View File

@@ -630,17 +630,11 @@ function debugTimer () {
// -----------------------------------------------------------------------------
function secondsSincePageLoad() {
// Get the current time
var currentTime = Date.now();
// Get the time when the page was loaded
var pageLoadTime = performance.timeOrigin;
// Calculate the difference in milliseconds
var timeDifference = currentTime - pageLoadTime;
// Get the current time since the page was loaded
var timeSincePageLoad = performance.now();
// Convert milliseconds to seconds
var secondsAgo = Math.floor(timeDifference / 1000);
var secondsAgo = Math.floor(timeSincePageLoad / 1000);
return secondsAgo;
}