Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

added a function to convert ms to s

Blue Mouse6056f3219e99
diff --git a/src/utils/generic.js b/src/utils/generic.js
index 39a4cecc9..edb44b624 100644
--- a/src/utils/generic.js
+++ b/src/utils/generic.js
@@ -38,6 +38,10 @@ export const secondsTillNextMonth = () => {
return 0 | (date - now) / 1000
}
+export const convertMsToSeconds = (ms) => {
+ return ms / 1000
+}
+
// Returns an object like { h: 0, m: 0, s: 0 } based on the seconds parameter provided
export const getTimeFromSeconds = (seconds) => {
const h = 0 | seconds / 3600