Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ps_create_time() and ps_boot_time() drifts on Linux #206

@dansmith01

Description

@dansmith01

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions