Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## [Unreleased]

## [1.15.3] - 2026-03-30

### Fixed

- Time tracking no longer accumulates hours during OS suspend (e.g., closing laptop lid) — elapsed time is now capped at the inactivity timeout

## [1.15.2] - 2026-03-17

### Fixed
Expand Down Expand Up @@ -292,7 +298,8 @@

- Support IntelliJ Platform 2024.3.5

[Unreleased]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.15.2...HEAD
[Unreleased]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.15.3...HEAD
[1.15.3]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.15.2...v1.15.3
[1.15.2]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.15.1...v1.15.2
[1.15.1]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.15.0...v1.15.1
[1.15.0]: https://github.com/codeclocker/codeclocker-intellij-plugin/compare/v1.14.0...v1.15.0
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginGroup = com.codeclocker
pluginName = CodeClocker
pluginRepositoryUrl = https://github.com/codeclocker/codeclocker-intellij-plugin
# SemVer format -> https://semver.org
pluginVersion = 1.15.2
pluginVersion = 1.15.3

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 252
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.codeclocker.plugin.intellij.services;

import com.codeclocker.plugin.intellij.tracking.TrackingPersistence;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
Expand Down Expand Up @@ -46,6 +47,8 @@ public synchronized void calculateAndAddElapsed(long now) {
}

long elapsedMillis = now - lastActivityTimestampMillis;
long maxElapsedMillis = TrackingPersistence.getInactivityTimeoutSeconds() * MILLIS_PER_SECOND;
elapsedMillis = Math.min(elapsedMillis, maxElapsedMillis);
long elapsedSeconds = Math.round((float) elapsedMillis / MILLIS_PER_SECOND);
if (elapsedSeconds > 0) {
this.accumulatedSeconds += elapsedSeconds;
Expand Down
Loading