I noticed that ps_create_time() will return a different process creation time, depending on the creation time of the process that queries it.
First Process:
docker run -it --rm --name test rocker/r-ver:4.5.0
install.packages('ps')
Sys.getpid()
#> [1] 1
ps::ps_create_time(ps::ps_handle(1))
#> [1] "2025-05-07 17:50:18 GMT"
(wait a few minutes before launching second process)
Second Process:
docker exec -it test R
ps::ps_create_time(ps::ps_handle(1))
#> [1] "2025-05-07 17:50:35 GMT"
(wait a few more minutes)
Third Process:
docker exec -it test R
ps::ps_create_time(ps::ps_handle(1))
#> [1] "2025-05-07 17:51:00 GMT"