Skip to content

Commit

Permalink
Update TimeSpan conversions while committing an update, to fix #2836.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 295141879
Change-Id: If6b91c5f3568a9baea49fb178d83cb68613e853f
  • Loading branch information
ozdemir08 authored and copybara-github committed Feb 14, 2020
1 parent e4f50b3 commit 8f04ae0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ private static AndroidJavaObject AsMetadataChange(SavedGameMetadataUpdate update
if (update.IsPlayedTimeUpdated)
{
using (builder.Call<AndroidJavaObject>("setPlayedTimeMillis",
(long) update.UpdatedPlayedTime.Value.TotalMilliseconds)) ;
Convert.ToInt64(update.UpdatedPlayedTime.Value.TotalMilliseconds))) ;
}

return builder.Call<AndroidJavaObject>("build");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public string CoverImageURL

public TimeSpan TotalTimePlayed
{
get { return TimeSpan.FromTicks(mJavaMetadata.Call<long>("getPlayedTime")); }
get { return TimeSpan.FromMilliseconds(mJavaMetadata.Call<long>("getPlayedTime")); }
}

public DateTime LastModifiedTimestamp
Expand All @@ -87,4 +87,4 @@ public DateTime LastModifiedTimestamp
}
}
}
#endif
#endif

0 comments on commit 8f04ae0

Please sign in to comment.