The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/views/room/contextualBar/RoomFiles/lib/getDifference.js

10 lines
288 B

export const MILLISECONDS = 1;
export const SECONDS = 1000;
export const MINUTES = 1000 * 60;
export const HOURS = 1000 * 60 * 60;
export const DAYS = 1000 * 60 * 60 * 24;
export const getDifference = (now, ts, scale = MILLISECONDS) => {
const diff = now - ts / scale;
return diff;
};