Changeset 505
- Timestamp:
- 01/12/11 04:02:45 (14 years ago)
- Files:
-
- trunk/src/core/time.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/core/time.d
r501 r505 2182 2182 Create a FracSec from the given units ("msecs", "usecs", or "hnsecs"). 2183 2183 2184 2184 Params: 2185 2185 units = The units to create a FracSec from. 2186 2186 value = The number of the given units passed the second. 2187 2187 2188 2188 Throws: 2189 2189 TimeException if the given value is less than 0 or would result in a 2190 2190 FracSec greater than or equal to 1 second. 2191 2191 +/ 2192 static FracSec from(string units)( intvalue) pure2192 static FracSec from(string units)(long value) pure 2193 2193 if(units == "msecs" || 2194 2194 units == "usecs" || 2195 2195 units == "hnsecs" || 2196 2196 units == "nsecs") 2197 2197 { 2198 2198 return FracSec(cast(int)convert!(units, "hnsecs")(value)); 2199 2199 } 2200 2200 2201 2201 unittest 2202 2202 {
