Skip to content

Commit

Permalink
Add start timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Cynosphere committed Feb 23, 2021
1 parent eaecba3 commit 7b504bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mb_DiscordRichPresence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ we need to convert them into underscores. */
TimeSpan t = DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1));
if (playing)
{
presence.endTimestamp = end - (long)(this.mbApiInterface.Player_GetPosition() / 1000);
long pos = (this.mbApiInterface.Player_GetPosition() / 1000);
presence.startTimestamp = now - pos;
presence.endTimestamp = end - pos;
}


Expand Down

0 comments on commit 7b504bc

Please sign in to comment.