powered by
Computes the duration between span start and end times in milliseconds.
calculate_span_duration_ms(start_time, end_time)
Numeric duration in milliseconds, or NA if either time is missing
POSIXct start timestamp
POSIXct end timestamp
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