Late to the party, but I made a package for this purpose, it's out on CRAN: pipetime.
Each time_pipe() reports the cumulative time since the pipeline started.
install.packages("pipetime")
library(pipetime)
rnorm(1E7) %>% mean %>% time_pipe("mean of 10M rnorm")
data.frame(x = 1:3) |>
mutate(y = {Sys.sleep(0.5); x*2 }) |>
time_pipe("calc 1") |>
mutate(z = {Sys.sleep(0.5); x/2 }) |>
time_pipe("total pipeline")