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

Changeset 494

Show
Ignore:
Timestamp:
01/09/11 19:52:07 (14 years ago)
Author:
Don Clugston
Message:

Removed usage of Phobos in druntime, which is causing the Windows build to break. As far as I can tell, the error message will only occur on PCs *earlier* than the AT !!!!
So it's not worth trying to make a nice error message.

Files:

Legend:

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

    r483 r494  
    2424 +/ 
    2525module core.time; 
    2626 
    2727import core.exception; 
    2828import core.stdc.time; 
    2929import core.stdc.stdio; 
    3030 
    3131version(Windows) 
    3232{ 
    3333import core.sys.windows.windows; 
    34 import std.windows.syserror; 
    3534} 
    3635else version(Posix) 
    3736{ 
    3837import core.sys.posix.time; 
    3938import core.sys.posix.sys.time; 
    4039} 
    4140 
    4241//This probably should be moved somewhere else in druntime which 
    4342//is OSX-specific. 
    4443//It's also totally untested, since I don't a have a Mac. 
     
    18261825            TimeException if it fails to get the time. 
    18271826      +/ 
    18281827    @trusted 
    18291828    static @property TickDuration currSystemTick() 
    18301829    { 
    18311830        version(Windows) 
    18321831        { 
    18331832            ulong ticks; 
    18341833 
    18351834            if(QueryPerformanceCounter(cast(long*)&ticks) == 0) 
    1836                 throw new TimeException(sysErrorString(GetLastError())); 
     1835                // This probably cannot happen on Windows 95 or later 
     1836                throw new TimeException("Failed in QueryPerformanceCounter()."); 
    18371837 
    18381838            return TickDuration(ticks); 
    18391839        } 
    18401840        else version(OSX) 
    18411841        { 
    18421842            static if(is(typeof(mach_absolute_time))) 
    18431843                return TickDuration(cast(long)mach_absolute_time()); 
    18441844            else 
    18451845            { 
    18461846                timeval tv;