We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ps_create_time()
ps_boot_time()
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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"
The text was updated successfully, but these errors were encountered:
Looks like the btime field in /proc/stat isn't static.
btime
/proc/stat
Sorry, something went wrong.
ps_boot_time() shows the issue a little clearer.
docker run -it --rm --name test rocker/r-ver:4.5.0 install.packages('ps') ps::ps_boot_time() #> [1] "2025-05-07 17:37:16 GMT"
docker exec -it test R ps::ps_boot_time() #> [1] "2025-05-07 17:37:26 GMT"
ps_string()
ps_boot_time() also drifts on Windows.
No branches or pull requests
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:
(wait a few minutes before launching second process)
Second Process:
(wait a few more minutes)
Third Process:
The text was updated successfully, but these errors were encountered: