Learn R Programming

bidux (version 0.4.0)

calculate_span_duration_ms: Calculate span duration in milliseconds

Description

Computes the duration between span start and end times in milliseconds.

Usage

calculate_span_duration_ms(start_time, end_time)

Value

Numeric duration in milliseconds, or NA if either time is missing

Arguments

start_time

POSIXct start timestamp

end_time

POSIXct end timestamp

Examples

Run this code
if (FALSE) {
start <- as.POSIXct("2024-01-01 12:00:00", tz = "UTC")
end <- as.POSIXct("2024-01-01 12:00:01.5", tz = "UTC")
calculate_span_duration_ms(start, end) # returns 1500
}

Run the code above in your browser using DataLab