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

Changeset 505

Show
Ignore:
Timestamp:
01/12/11 04:02:45 (14 years ago)
Author:
jmdavis
Message:

Small tweak to core.time.

Files:

Legend:

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

    r501 r505  
    21822182        Create a FracSec from the given units ("msecs", "usecs", or "hnsecs"). 
    21832183 
    21842184        Params: 
    21852185            units = The units to create a FracSec from. 
    21862186            value = The number of the given units passed the second. 
    21872187 
    21882188        Throws: 
    21892189            TimeException if the given value is less than 0 or would result in a 
    21902190            FracSec greater than or equal to 1 second. 
    21912191      +/ 
    2192     static FracSec from(string units)(int value) pure 
     2192    static FracSec from(string units)(long value) pure 
    21932193        if(units == "msecs" || 
    21942194           units == "usecs" || 
    21952195           units == "hnsecs" || 
    21962196           units == "nsecs") 
    21972197    { 
    21982198        return FracSec(cast(int)convert!(units, "hnsecs")(value)); 
    21992199    } 
    22002200 
    22012201    unittest 
    22022202    {