Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 499

Show
Ignore:
Timestamp:
01/11/11 04:27:41 (14 years ago)
Author:
jmdavis
Message:

Shifted attributes on constructors in core.time due to bug# 5427.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/core/time.d

    r498 r499  
    11811181        assert(Duration(-120_795).toString() == "-12 ms, -79 ÎŒs, and -5 hnsecs"); 
    11821182        assert(Duration(-12_096_020_900_003).toString() == "-2 weeks, -2 secs, -90 ms, and -3 hnsecs"); 
    11831183    } 
    11841184 
    11851185 
    11861186    /++ 
    11871187        Params: 
    11881188            hnsecs = The total number of hecto-nanoseconds in this duration. 
    11891189      +/ 
    11901190    @safe 
    1191     this(long hnsecs) pure nothrow 
     1191    pure nothrow this(long hnsecs) 
    11921192    { 
    11931193        _hnsecs = hnsecs; 
    11941194    } 
    11951195 
    11961196 
    11971197    long _hnsecs; 
    11981198} 
    11991199 
    12001200 
    12011201/++ 
     
    18031803            throw new TimeException("Attempted division by 0."); 
    18041804 
    18051805        return TickDuration(cast(long)(length / value)); 
    18061806    } 
    18071807 
    18081808 
    18091809    /++ 
    18101810        Params: 
    18111811            ticks = The number of ticks in the TickDuration. 
    18121812      +/ 
    1813     this(long ticks) pure nothrow 
     1813    pure nothrow this(long ticks) 
    18141814    { 
    18151815        this.length = ticks; 
    18161816    } 
    18171817 
    18181818 
    18191819    /++ 
    18201820        The current system tick. The number of ticks per second varies from 
    18211821        system to system. This uses a monotonic clock, so it's intended for 
    18221822        precision timing by comparing relative time values, not for getting 
    18231823        the current system time. 
     
    26732673 
    26742674 
    26752675    /++ 
    26762676        Params: 
    26772677            hnsecs = The number of hnsecs passed the second. 
    26782678 
    26792679        Throws: 
    26802680            TimeException if the given hnsecs less than 0 or would result in a 
    26812681            FracSec greater than or equal to 1 second. 
    26822682      +/ 
    2683     this(int hnsecs) pure 
     2683    pure this(int hnsecs) 
    26842684    { 
    26852685        _enforceValid(hnsecs); 
    26862686        _hnsecs = hnsecs; 
    26872687    } 
    26882688 
    26892689 
    26902690    pure invariant() 
    26912691    { 
    26922692        if(!_valid(_hnsecs)) 
    26932693            throw new AssertError("Invaliant Failure: hnsecs [" ~ numToString(_hnsecs) ~ "]", __FILE__, __LINE__); 
     
    27032703  +/ 
    27042704class TimeException : Exception 
    27052705{ 
    27062706    /++ 
    27072707        Params: 
    27082708            msg  = The message for the exception. 
    27092709            file = The file where the exception occurred. 
    27102710            line = The line number where the exception occurred. 
    27112711            next = The previous exception in the chain of exceptions, if any. 
    27122712      +/ 
    2713     this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null) nothrow 
     2713    nothrow this(string msg, string file = __FILE__, size_t line = __LINE__, Throwable next = null) 
    27142714    { 
    27152715        super(msg, file, line, next); 
    27162716    } 
    27172717} 
    27182718 
    27192719 
    27202720//============================================================================== 
    27212721// Private Section. 
    27222722// 
    27232723// Much of this is a copy or simplified copy of what's in std.datetime.