aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/content.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content.ts')
-rw-r--r--src/content.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/content.ts b/src/content.ts
index 9c7b079f..ee989c30 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -1433,9 +1433,10 @@ function getRealCurrentTime(): number {
}
function startOrEndTimingNewSegment() {
+ const roundedTime = Math.round((getRealCurrentTime() + Number.EPSILON) * 1000) / 1000;
if (!isSegmentCreationInProgress()) {
sponsorTimesSubmitting.push({
- segment: [getRealCurrentTime()],
+ segment: [roundedTime],
UUID: null,
category: Config.config.defaultCategory,
actionType: ActionType.Skip,
@@ -1445,7 +1446,7 @@ function startOrEndTimingNewSegment() {
// Finish creating the new segment
const existingSegment = getIncompleteSegment();
const existingTime = existingSegment.segment[0];
- const currentTime = getRealCurrentTime();
+ const currentTime = roundedTime;
// Swap timestamps if the user put the segment end before the start
existingSegment.segment = [Math.min(existingTime, currentTime), Math.max(existingTime, currentTime)];