Skip to content

Commit

Permalink
Revert "Fix Discord RPC Timestamp jitter"
Browse files Browse the repository at this point in the history
  • Loading branch information
Mastermindzh authored Dec 9, 2024
1 parent aaf7a1b commit 579207e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/scripts/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ const getActivity = (): SetActivity => {
if (includeTimestamps) {
const currentSeconds = convertDurationToSeconds(mediaInfo.current);
const durationSeconds = convertDurationToSeconds(mediaInfo.duration);
const now = Math.trunc((Date.now() + 500) / 1000);
const date = new Date();
const now = Math.floor(date.getTime() / 1000);
presence.startTimestamp = now - currentSeconds;
presence.endTimestamp = presence.startTimestamp + durationSeconds;
}
Expand Down

0 comments on commit 579207e

Please sign in to comment.