Skip to content

Commit

Permalink
refactor: change from milliseconds to seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasbento committed Jan 4, 2025
1 parent 8f5b153 commit 56b8416
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/react-native-tracing/ios/NativeInstrumentation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class NativeInstrumentation: NSObject, RCTBridgeModule {
@objc
public static func initializeNativeInstrumentation() {
NativeInstrumentation.cachedMetrics = nil
NativeInstrumentation.startTime = Date().timeIntervalSince1970 * 1000
NativeInstrumentation.startTime = Date().timeIntervalSince1970
}

override init() {
Expand Down Expand Up @@ -38,7 +38,7 @@ public class NativeInstrumentation: NSObject, RCTBridgeModule {
return
}

let endTime = Date().timeIntervalSince1970 * 1000
let endTime = Date().timeIntervalSince1970
let duration = endTime - startTime

let metrics: [String: Double] = [
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-tracing/src/wrapHOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const measureStartupTime = async (): Promise<void> => {
api.pushMeasurement({
type: 'app_startup_time',
values: {
startup_duration_ms: metrics.startupDuration,
startup_duration: metrics.startupDuration,
},
});
} catch (error) {
Expand Down

0 comments on commit 56b8416

Please sign in to comment.