Skip to content

Commit 33ae1ef

Browse files
feat: convert ms to seconds in crash running time (#239)
* feat: convert ms to seconds in crash running time * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: Artūrs Kadiķis <[email protected]>
1 parent c908a57 commit 33ae1ef

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* Fixed a bug where setting custom user properties would not work.
1919
* Fixed a bug where setting organization of the user would not work.
2020
* Fixed a bug where sending a user profile picture with checksum was not possible.
21+
* Fixed a bug where running time calculation was sent as a milliseconds but should have been in seconds.
2122

2223
* Deprecated "Countly::backendMode()" call, use "Countly::backendM" instead via "instance()" call.
2324
* Deprecated "Usage::addLocation(double, double)" call, use "Countly::location::setLocation" instead via "instance()" call.

sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleCrashes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected void recordExceptionInternal(Throwable t, boolean handled, Map<String,
103103

104104
public CrashImpl onCrash(InternalConfig config, CrashImpl crash) {
105105
long running = started == 0 ? 0 : TimeUtils.nsToMs(System.nanoTime() - started);
106-
crash.putMetrics(running);
106+
crash.putMetrics(running / TimeUtils.MS_IN_SECOND);
107107

108108
if (!crash.getData().has("_os")) {
109109
L.w("[ModuleCrash] onCrash, While recording an exception 'OS name' was either null or empty");

0 commit comments

Comments
 (0)