Skip to content

uu timeout is less precise than GNU timeout #11615

Description

@sylvestre

uu timeout sleeps for 100ms intervals at

thread::sleep(Duration::from_millis(100));
instead of using timer_create or setitimer,
which are more precise.

timeout (GNU coreutils) 9.7
Packaged by Debian (9.7-3)                                                                                                                                                                                            Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.                                                                                                                                                    There is NO WARRANTY, to the extent permitted by law.

Written by Padraig Brady.                                                                                                                                                                                             root@b082d601e194:/tmp# time timeout 0.01 sleep 1
real    0m0.014s
user    0m0.000s
sys     0m0.004s
root@03081849be59:/tmp# timeout --version
timeout (uutils coreutils) 0.6.0
root@03081849be59:/tmp# time timeout 0.01 sleep 1
                                                                                                                                                                                                                      real    0m0.117s
user    0m0.002s
sys     0m0.014s                                                                                                                                                                                                      ```

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions