about summary refs log tree commit diff
path: root/src/libcore/time.rs
AgeCommit message (Collapse)AuthorLines
2020-04-20Stop accessing module level int consts via crate::<Ty>Linus Färnstrand-1/+1
2020-04-03Make documentation examples use new integer assoc constsLinus Färnstrand-2/+2
2019-12-22no longer promote non-pattern const functionsRalf Jung-3/+0
2019-12-18Propagate cfg bootstrapMark Rousskov-12/+12
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-0/+12
functions with a `const` modifier
2019-11-26Format libcore with rustfmtDavid Tolnay-39/+33
This commit applies rustfmt with default settings to files in src/libcore *that are not involved in any currently open PR* to minimize merge conflicts. The list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in `outstanding_files`, the relevant commands were: $ find src/libcore -name '*.rs' | xargs rustfmt --edition=2018 $ rg libcore outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of libcore.
2019-11-06Have tidy ensure that we document all `unsafe` blocks in libcoreOliver Scherer-1/+1
2019-07-30fix testsArtyom Pavlov-0/+2
2019-07-30mark div_duration methods as unstable, update tracking issueArtyom Pavlov-2/+2
2019-07-17unconstify methodsnewpavlov-2/+2
2019-07-17stabilize duration_floatnewpavlov-20/+10
2019-04-19libcore: deny more...Mazdak Farrokhzad-2/+2
2019-04-18libcore => 2018Taiki Endo-5/+5
2019-03-12fix typoArtyom Pavlov-1/+1
2019-03-11fix testArtyom Pavlov-2/+2
2019-03-11fix testsnewpavlov-5/+9
2019-03-11move MAX_NANOS_F64/32 to methodsnewpavlov-2/+4
2019-03-11consistent naming for duration_float methods and additional f32 methodsnewpavlov-9/+121
2019-02-23Rollup merge of #58595 - stjepang:make-duration-consts-associated, r=oli-obkMazdak Farrokhzad-16/+52
Turn duration consts into associated consts As suggested in https://github.com/rust-lang/rust/issues/57391#issuecomment-459658236, I'm moving `Duration` constants (`SECOND`, `MILLISECOND` and so on; currently behind unstable `duration_constants` feature) into the `impl Duration` block. cc @frewsxcv @SimonSapin
2019-02-21Enable feature duration_constants in examplesStjepan Glavina-0/+4
2019-02-20Add examples for duration constantsStjepan Glavina-0/+32
2019-02-20Turn duration consts into associated constsStjepan Glavina-16/+16
2019-02-10libs: doc commentsAlexander Regueiro-1/+1
2019-02-10tests: doc commentsAlexander Regueiro-1/+1
2019-01-07Specify the tracking issueStjepan Glavina-4/+4
2019-01-06Add duration constantsStjepan Glavina-0/+16
2018-12-26Stabilize duration_as_u128Sunjay Varma-6/+3
2018-12-25Remove licensesMark Rousskov-9/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-3/+3
2018-11-10constify parts of libstd.Mazdak Farrokhzad-0/+0
2018-11-10constify libcore/time.rsMazdak Farrokhzad-8/+4
2018-10-31Bump nightly to 1.32.0Alex Crichton-4/+4
* Also update the bootstrap compiler * Update cargo to 1.32.0 * Clean out stage0 annotations
2018-10-03Only promote calls to `#[rustc_promotable]` const fnsOliver Schneider-0/+4
2018-09-20Rollup merge of #52813 - newpavlov:duration_mul_div_extras, r=alexcrichtonkennytm-1/+120
Duration div mul extras Successor of #52556. This PR adds the following `impl`s: - `impl Mul<Duration> for u32` (to allow `10*SECOND` in addition to `SECOND*10`) - `impl Mul<f64> for Duration` (to allow `2.5*SECOND` vs `2*SECOND + 500*MILLISECOND`) - `impl Mul<Duration> for f64` - `impl MulAssign<f64> for Duration` - `impl Div<f64> for Duration` - `impl DivAssign<f64> for Duration` - `impl Div<Duration> for Duration` (`Output = f64`, can be useful e.g. for `duration/MINUTE`) `f64` is chosen over `f32` to minimize rounding errors. (52 bits fraction precision vs `Duration`'s ~94 bit)
2018-09-19Added tracking issue, fixed check, 1.30 -> 1.31Artyom Pavlov-8/+8
2018-09-13add panics section to method docsArtyom Pavlov-0/+9
2018-09-13move checks to from_float_secsArtyom Pavlov-25/+15
2018-09-13remove trailing spacesArtyom Pavlov-2/+2
2018-09-13add as_float_secs and from_float_secs methods, refactor float methodsArtyom Pavlov-36/+55
2018-09-12fix testsArtyom Pavlov-3/+3
2018-09-12fix testsArtyom Pavlov-1/+4
2018-09-12fix doctestsArtyom Pavlov-0/+6
2018-09-12more explicit implArtyom Pavlov-1/+1
2018-09-12remove newlineArtyom Pavlov-1/+0
2018-09-12Move float ops to unstable inherent methodsArtyom Pavlov-84/+83
2018-08-04Remove redundant field names in structsljedrz-4/+4
2018-08-041.29.0 -> 1.30.0Артём Павлов [Artyom Pavlov]-7/+7
2018-07-31don't duplicate implsАртём Павлов [Artyom Pavlov]-17/+2
2018-07-30change negativity checkАртём Павлов [Artyom Pavlov]-12/+12
2018-07-29add MAX_NANOS_F64 constantАртём Павлов [Artyom Pavlov]-3/+4