# std.time: Use clock_nanosleep\(\) to implement sleep\(\) on Linux\. · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f35015575ef7ef5b493cf217f5e9c7152d6b6658)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f35015575ef7ef5b493cf217f5e9c7152d6b6658

Requested commit: f35015575ef7ef5b493cf217f5e9c7152d6b6658

Commit: f35015575ef7ef5b493cf217f5e9c7152d6b6658

Tree: 71d78aca61e666fad0c4f3825eef7996efe46abf

Author: Alex Rønne Petersen

Committer: Alex Rønne Petersen

## Message

```
std.time: Use clock_nanosleep() to implement sleep() on Linux.

This fixes the function for riscv32 where the old nanosleep() is not available.
clock_nanosleep() has been available since Linux 2.6 and glibc 2.1 anyway.

```

## Parents

- [804319799586961052a9e4f283ad94d5018ce5fa](https://git.cafe/gitcafe/zig/commit/804319799586961052a9e4f283ad94d5018ce5fa?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f35015575ef7ef5b493cf217f5e9c7152d6b6658?format=markdown)
