diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2019-01-07 16:25:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-07 16:25:40 +0100 |
| commit | bc38143ad217c8dcf79049f178eccd84211d5956 (patch) | |
| tree | fc0e46cc9bd9700b8ca6e1542feb294cbf422532 /src/rustllvm/RustWrapper.cpp | |
| parent | 5cfc8458847fead508e8986b8e4cc62218dbc93f (diff) | |
| parent | 8c902b66339f54b40d3033c864675929b2c8a65b (diff) | |
| download | rust-bc38143ad217c8dcf79049f178eccd84211d5956.tar.gz rust-bc38143ad217c8dcf79049f178eccd84211d5956.zip | |
Rollup merge of #57375 - stjepang:duration-constants, r=joshtriplett
Add duration constants Add constants `SECOND`, `MILLISECOND`, `MICROSECOND`, and `NANOSECOND` to `core::time`. This will make working with durations more ergonomic. Compare: ```rust // Convenient, but deprecated function. thread::sleep_ms(2000); // The current canonical way to sleep for two seconds. thread::sleep(Duration::from_secs(2)); // Sleeping using one of the new constants. thread::sleep(2 * SECOND); ```
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
