about summary refs log tree commit diff
path: root/src/libextra/time.rs
AgeCommit message (Collapse)AuthorLines
2014-02-21Move time out of extra (cc #8784)Arcterus-1476/+0
2014-02-03extra: Remove io_error usageAlex Crichton-8/+8
2014-01-21[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old ↵Simon Sapin-1/+1
from_utf8_owned() behavior
2014-01-21Remove unnecessary parentheses.Huon Wilson-3/+3
2014-01-17auto merge of #11598 : alexcrichton/rust/io-export, r=brsonbors-2/+1
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered) cc #11119
2014-01-17Tweak the interface of std::ioAlex Crichton-2/+1
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
2014-01-14extra: Ignore time tests on android correctlyBrian Anderson-1/+1
2014-01-09Remove eof() from io::ReaderAlex Crichton-1/+1
2014-01-06Remove some unnecessary type castsFlorian Hahn-2/+2
Conflicts: src/librustc/middle/lint.rs
2013-12-30Convert some C functions to rust functionsAlex Crichton-10/+96
Right now on linux, an empty executable with LTO still depends on librt becaues of the clock_gettime function in rust_builtin.o, but this commit moves this dependency into a rust function which is subject to elimination via LTO. At the same time, this also drops libstd's dependency on librt on unices that are not OSX because the library is only used by extra::time (and now the dependency is listed in that module instead).
2013-12-13Ignore time tests on android. #10958Brian Anderson-0/+1
2013-11-28Register new snapshotsAlex Crichton-3/+3
2013-11-26librustc: Fix merge fallout.Patrick Walton-2/+2
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-1/+1
2013-11-24Remove linked failure from the runtimeAlex Crichton-1/+1
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
2013-11-18rt: Namespace all C functions under rust_Brian Anderson-4/+4
2013-11-13auto merge of #10447 : alexcrichton/rust/flaky-time-test, r=catamorphismbors-6/+5
This test was failing periodically on windows and other platforms, and in debugging the issue locally I've found that the previous test was failing at the assertion `ns0 <= ns1`. Upon inspecting the values, the two numbers were very close to one another, but off by a little bit. I believe that this is because `precise_time_s` goes from `u64` -> `f64` and then we go again back to `u64` for the assertion. This conversion is a lossy one that's not always guaranteed to succeed, so instead I've changed the test to only compare against u64 instances.
2013-11-12Make a time test less flakyAlex Crichton-6/+5
This test was failing periodically on windows and other platforms, and in debugging the issue locally I've found that the previous test was failing at the assertion `ns0 <= ns1`. Upon inspecting the values, the two numbers were very close to one another, but off by a little bit. I believe that this is because `precise_time_s` goes from `u64` -> `f64` and then we go again back to `u64` for the assertion. This conversion is a lossy one that's not always guaranteed to succeed, so instead I've changed the test to only compare against u64 instances.
2013-11-11Move std::rt::io to std::ioAlex Crichton-2/+2
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-13/+0
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-08extra::time: Fix test on Windowsklutzy-40/+59
Closes #10307
2013-10-24Remove even more of std::ioAlex Crichton-58/+75
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-23Re-make time struct fields publicSteven Fackler-13/+13
These are supposed to be raw C-like structs mirroring time.h's struct tm and struct timespec.
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-2/+0
2013-10-23Making fields in std and extra : private #4386reedlepee-14/+17
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-10/+10
Who doesn't like a massive renaming?
2013-10-14Removing ccdeclSteve Klabnik-1/+1
as per https://github.com/mozilla/rust/pull/9606#discussion_r6930872
2013-10-14Remove unused abi attributes.Steve Klabnik-2/+1
They've been replaced by putting the name on the extern block. #[abi = "foo"] goes to extern "foo" { } Closes #9483.
2013-10-05extra: remove commented out 'X' and 'x' formatsLuis de Bethencourt-2/+0
These formats are already covered with 'T' | 'X' in line 571 and 'D' | 'x' in line 446.
2013-10-03extra: remove unnecessary second level functionsLuis de Bethencourt-11/+4
do_strptime() and do_strftime()
2013-10-02auto merge of #9689 : luisbg/rust/strftime, r=alexcrichtonbors-8/+7
Plus testing added for %X and %x which were supported but not tested. Working towards #2350
2013-10-02extra: %W and %+ support in time::strftimeLuis de Bethencourt-8/+7
Plus testing added for %X and %x which were supported but not tested. Working towards #2350
2013-10-02auto merge of #9670 : luisbg/rust/strftime, r=alexcrichtonbors-8/+61
2013-10-02extra: %G, %g and %V support in time::strftimeLuis de Bethencourt-6/+59
Fixes #2350
2013-10-01extra: %U support in time::strftimeLuis de Bethencourt-2/+2
Fixes #2350
2013-10-01remove the `float` typeDaniel Micay-4/+4
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30extra: Remove usage of fmt!Alex Crichton-38/+38
2013-09-12std: Rename {Option,Result}::chain{,_err}* to {and_then,or_else}Erick Tryzelaar-32/+32
2013-09-05Add fractional second support to str{p,f}timeSteven Fackler-3/+37
The ISO 8601 standard does not mandate any specific precision for fractional seconds, so this accepts input of any length, ignoring the part after the nanoseconds place. It may be more correct to round with the tenths of nanoseconds digit, but then we'd have to deal with carrying the round through the entire Tm struct (e.g. for a time like Dec 31 11:59.999999999999). %f is the format specifier that Python's datetime library uses for 0-padded microseconds so it seemed appropriate here. cc #2350
2013-08-23rt: Remove last use of C++ exchange allocBrian Anderson-1/+4
2013-08-20rm obsolete integer to_str{,_radix} free functionsDaniel Micay-5/+3
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-0/+12
2013-08-16Implement Clone and DeepClone for time types.Chris Morgan-2/+2
2013-08-09Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-3/+0
remove-str-trailing-nulls
2013-08-09Remove redundant Ord method impls.OGINO Masanori-3/+0
Basically, generic containers should not use the default methods since a type of elements may not guarantees total order. str could use them since u8's Ord guarantees total order. Floating point numbers are also broken with the default methods because of NaN. Thanks for @thestinger. Timespec also guarantees total order AIUI. I'm unsure whether extra::semver::Identifier does so I left it alone. Proof needed. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-08-08Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-2/+2
remove-str-trailing-nulls
2013-08-07Forbid `priv` where it has no effectAlex Crichton-2/+2
This is everywhere except struct fields and enum variants.
2013-08-04Merge remote-tracking branch 'remotes/origin/master' into str-remove-nullErick Tryzelaar-5/+5
2013-08-04extra: make sure time::match_digits does not read past the end of the strErick Tryzelaar-7/+11
2013-08-03remove obsolete `foreach` keywordDaniel Micay-5/+5
this has been replaced by `for`