Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 2900

Show
Ignore:
Timestamp:
11/20/07 17:56:55 (1 year ago)
Author:
schveiguy
Message:

Updated to use new TimeSpan? struct and DateTime? for all date/time related functi
ons. THIS IS A BREAKING CHANGE.

closes #671

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dsss.conf

    r2731 r2900  
    66    install tango/core/Memory.di $INCLUDE_PREFIX/tango/core ; \ 
    77    install tango/core/Runtime.di $INCLUDE_PREFIX/tango/core ; \ 
    8     install tango/core/Thread.di $INCLUDE_PREFIX/tango/core 
     8    install tango/core/Thread.di $INCLUDE_PREFIX/tango/core ; \ 
     9    install tango/core/TimeSpan.di $INCLUDE_PREFIX/tango/core 
    910version (GNU) { 
    1011    prebuild = $DSSS_BUILD -obj -explicit lib/common/tango/core/BitManip.d -fintfc-file=tango/core/BitManip.di ; \ 
     
    1213    $DSSS_BUILD -obj -explicit lib/common/tango/core/Memory.d -fintfc-file=tango/core/Memory.di ; \ 
    1314    $DSSS_BUILD -obj -explicit lib/common/tango/core/Runtime.d -fintfc-file=tango/core/Runtime.di ; \ 
    14     $DSSS_BUILD -obj -explicit lib/common/tango/core/Thread.d -fintfc-file=tango/core/Thread.di 
     15    $DSSS_BUILD -obj -explicit lib/common/tango/core/Thread.d -fintfc-file=tango/core/Thread.di ; \ 
     16    $DSSS_BUILD -obj -explicit lib/common/tango/core/TimeSpan.d -fintfc-file=tango/core/TimeSpan.di 
    1517} else version (DigitalMars) { 
    1618    prebuild = $DSSS_BUILD -obj -explicit lib/common/tango/core/BitManip.d -Hftango/core/BitManip.di ; \ 
     
    1820    $DSSS_BUILD -obj -explicit lib/common/tango/core/Memory.d -Hftango/core/Memory.di ; \ 
    1921    $DSSS_BUILD -obj -explicit lib/common/tango/core/Runtime.d -Hftango/core/Runtime.di ; \ 
    20     $DSSS_BUILD -obj -explicit lib/common/tango/core/Thread.d -Hftango/core/Thread.di 
     22    $DSSS_BUILD -obj -explicit lib/common/tango/core/Thread.d -Hftango/core/Thread.di ; \ 
     23    $DSSS_BUILD -obj -explicit lib/common/tango/core/TimeSpan.d -Hftango/core/TimeSpan.di 
    2124} 
    2225 
  • trunk/example/networking/selector.d

    r2525 r2900  
    103103    uint        closeCount          = 0; 
    104104    uint        errorCount          = 0; 
    105     Time        start               = Clock.now; 
     105    DateTime    start               = Clock.now; 
    106106    Thread      clientThread; 
    107107 
     
    113113    try 
    114114    { 
    115         Interval            timeout         = 1.0; // 1 sec 
     115        TimeSpan            timeout         = TimeSpan.seconds(1); 
    116116        InternetAddress     addr            = new InternetAddress(SERVER_ADDR, SERVER_PORT); 
    117117        ServerSocket        serverSocket    = new ServerSocket(addr, 5); 
     
    294294                    failedConnectCount, failedReceiveCount, failedSendCount, errorCount)); 
    295295 
    296     log.info(sprint("Total time: {0} ms", cast(uint) ((Clock.now - start) / start.TicksPerMillisecond))); 
     296    log.info(sprint("Total time: {0} ms", cast(uint) (Clock.now - start).milliseconds)); 
    297297 
    298298    clientThread.join(); 
  • trunk/example/system/localtime.d

    r2465 r2900  
    2222 
    2323        // get GMT difference in minutes 
    24         auto tz = cast(int) (WallClock.zone / Time.TicksPerMinute)
     24        auto tz = cast(int) WallClock.zone.minutes
    2525        char sign = '+'; 
    2626        if (tz < 0) 
  • trunk/lib/common/tango/core/Thread.d

    r2624 r2900  
    1515public 
    1616{ 
    17     import tango.core.Type : Interval
     17    import tango.core.TimeSpan
    1818} 
    1919private 
     
    763763     * ------------------------------------------------------------------------- 
    764764     */ 
    765     static void sleep( Interval period ) 
     765    static void sleep( TimeSpan period ) 
    766766    in 
    767767    { 
    768         assert( period * 1_000 < uint.max - 1 ); 
     768        assert( period.milliseconds < uint.max - 1 ); 
    769769    } 
    770770    body 
     
    772772        version( Win32 ) 
    773773        { 
    774             Sleep( cast(uint)( period * 1_000 ) ); 
     774            Sleep( cast(uint)( period.milliseconds ) ); 
    775775        } 
    776776        else version( Posix ) 
     
    779779            timespec tout = void; 
    780780 
    781             if( tin.tv_sec.max < period
     781            if( tin.tv_sec.max < period.seconds
    782782            { 
    783783                tin.tv_sec  = tin.tv_sec.max; 
     
    786786            else 
    787787            { 
    788                 tin.tv_sec  = cast(typeof(tin.tv_sec))  period
    789                 tin.tv_nsec = cast(typeof(tin.tv_nsec)) ((period % 1.0) * 1_000_000_000)
     788                tin.tv_sec  = cast(typeof(tin.tv_sec))  period.seconds
     789                tin.tv_nsec = cast(typeof(tin.tv_nsec)) period.nanoseconds % 1_000_000_000
    790790            } 
    791791 
     
    799799            } 
    800800        } 
     801    } 
     802 
     803    /** 
     804     * Floating point version.  The period is in terms of seconds 
     805     * 
     806     * Note: The period is not always accurate, so it is possible that the 
     807     * function would return with a timeout before the specified period.  For 
     808     * more accuracy, use the TimeSpan version. 
     809     * 
     810     */ 
     811    static void sleep( double period ) 
     812    { 
     813      sleep(TimeSpan.interval(period)); 
    801814    } 
    802815 
  • trunk/lib/common/tango/posix.mak

    r2863 r2900  
    7676    core/Runtime.o \ 
    7777    core/Thread.o \ 
    78     core/ThreadASM.o 
     78    core/ThreadASM.o \ 
     79    core/TimeSpan.o 
    7980 
    8081OBJ_STDC= \ 
     
    9697    core/Memory.html \ 
    9798    core/Runtime.html \ 
    98     core/Thread.html 
     99    core/Thread.html \ 
     100    core/TimeSpan.html 
    99101 
    100102ALL_DOCS= 
  • trunk/tango/core/sync/Condition.d

    r2809 r2900  
    1010 
    1111 
    12 public import tango.core.Type
     12public import tango.core.TimeSpan
    1313public import tango.core.Exception : SyncException; 
    1414public import tango.core.sync.Mutex; 
     
    135135     * Wait up to period seconds for a notification. 
    136136     * 
     137     * Note: The period is not always accurate, so it is possible that the 
     138     * function would return with a timeout before the specified period.  For 
     139     * more accuracy, use the TimeSpan version. 
     140     * 
    137141     * Params: 
    138142     *  period = The number of seconds to wait. 
     
    144148     *  SyncException on error. 
    145149     */ 
    146     bool wait( Interval period ) 
     150    bool wait( double period ) 
     151    { 
     152        return wait(TimeSpan.interval(period)); 
     153    } 
     154 
     155    /** 
     156     * Wait up to the specified time period for a notification. 
     157     * 
     158     * Params: 
     159     *  period = The time to wait. 
     160     * 
     161     * Returns: 
     162     *  true if notified before the timeout and false if not. 
     163     * 
     164     * Throws: 
     165     *  SyncException on error. 
     166     */ 
     167    bool wait( TimeSpan period ) 
    147168    { 
    148169        version( Win32 ) 
    149170        { 
    150             return timedWait( period < INFINITE ? 
    151                                 cast(uint)( period * 1_000 )  : INFINITE - 1 ); 
     171            return timedWait( period.milliseconds < INFINITE ? 
     172                                cast(uint)( period.milliseconds )  : INFINITE - 1 ); 
    152173        } 
    153174        else version( Posix ) 
     
    519540            { 
    520541                waiting    = true; 
    521                 alertedOne = condReady.wait( 1.0 ); 
    522                 alertedTwo = condReady.wait( 1.0 ); 
     542                alertedOne = condReady.wait( 1 ); 
     543                alertedTwo = condReady.wait( 1 ); 
    523544            } 
    524545        } 
  • trunk/tango/core/sync/Config.d

    r2809 r2900  
    1010 
    1111 
    12 public import tango.core.Type
     12public import tango.core.TimeSpan
    1313public import tango.core.Exception : SyncException; 
    1414 
     
    3838 
    3939 
    40     void adjTimespec( inout timespec t, Interval i ) 
     40    void adjTimespec( inout timespec t, TimeSpan i ) 
    4141    { 
    4242        enum 
     
    4545        } 
    4646 
    47         if( t.tv_sec.max - t.tv_sec < i
     47        if( t.tv_sec.max - t.tv_sec < i.seconds
    4848        { 
    4949            t.tv_sec  = t.tv_sec.max; 
     
    5252        else 
    5353        { 
    54             t.tv_sec  += i
    55             i = (i % 1.0) * SECS_TO_NANOS; 
    56             if( SECS_TO_NANOS - t.tv_nsec < i
     54            t.tv_sec  += i.seconds
     55            long ns = i.nanoseconds % SECS_TO_NANOS; 
     56            if( SECS_TO_NANOS - t.tv_nsec < ns
    5757            { 
    5858                t.tv_sec += 1; 
    59                 i -= SECS_TO_NANOS; 
     59                ns -= SECS_TO_NANOS; 
    6060            } 
    61             t.tv_nsec += cast(typeof(t.tv_sec)) i
     61            t.tv_nsec += cast(typeof(t.tv_sec)) ns
    6262        } 
    6363    } 
  • trunk/tango/core/sync/Semaphore.d

    r2809 r2900  
    99 
    1010 
    11 public import tango.core.Type
     11public import tango.core.TimeSpan
    1212public import tango.core.Exception : SyncException; 
    1313 
     
    126126     * Otherwise, return false. 
    127127     * 
     128     * Note: The period is not always accurate, so it is possible that the 
     129     * function would return with a timeout before the specified period.  For 
     130     * more accuracy, use the TimeSpan version. 
     131     * 
    128132     * Params: 
    129133     *  period = The number of seconds to wait. 
     
    135139     *  SyncException on error. 
    136140     */ 
    137     bool wait( Interval period ) 
    138     { 
    139         version( Win32 ) 
    140         { 
    141             DWORD t = period < INFINITE ? 
    142                         cast(uint)( period * 1_000 )  : INFINITE - 1; 
     141    bool wait( double period ) 
     142    { 
     143        return wait(TimeSpan.interval(period)); 
     144    } 
     145 
     146    /** 
     147     * Wait up to the specified time for the current count to be above zero. 
     148     * If this occurs, then atomically decrement the count by one and return 
     149     * true.  Otherwise, return false. 
     150     * 
     151     * Params: 
     152     *  period = The amount of time to wait. 
     153     * 
     154     * Returns: 
     155     *  true if notified before the timeout and false if not. 
     156     * 
     157     * Throws: 
     158     *  SyncException on error. 
     159     */ 
     160    bool wait( TimeSpan period ) 
     161    { 
     162        version( Win32 ) 
     163        { 
     164            DWORD t = period.milliseconds < INFINITE ? 
     165                        cast(uint)( period.milliseconds )  : INFINITE - 1; 
    143166            switch( WaitForSingleObject( m_hndl, t ) ) 
    144167            { 
  • trunk/tango/io/FilePath.d

    r2899 r2900  
    2323private import  tango.core.Exception; 
    2424 
    25 private import  tango.core.Type : Time; 
     25private import  tango.util.time.DateTime; 
    2626 
    2727/******************************************************************************* 
     
    813813        ***********************************************************************/ 
    814814 
    815         final Time modified () 
     815        final DateTime modified () 
    816816        { 
    817817                return timeStamps.modified; 
     
    825825        ***********************************************************************/ 
    826826 
    827         final Time accessed () 
     827        final DateTime accessed () 
    828828        { 
    829829                return timeStamps.accessed; 
     
    837837        ***********************************************************************/ 
    838838 
    839         final Time created () 
     839        final DateTime created () 
    840840        { 
    841841                return timeStamps.created; 
     
    11001100                final Stamps timeStamps () 
    11011101                { 
    1102                         static Time convert (FILETIME time) 
     1102                        static DateTime convert (FILETIME time) 
    11031103                        { 
    1104                                 return cast(Time) (Time.TicksTo1601 + *cast(ulong*) &time); 
     1104                                return DateTime.epoch1601 + TimeSpan(*cast(ulong*) &time); 
    11051105                        } 
    11061106 
     
    14181418                final Stamps timeStamps () 
    14191419                { 
    1420                         static Time convert (timeval* tv) 
     1420                        static DateTime convert (timeval* tv) 
    14211421                        { 
    1422                                 return cast(Time) (Time.TicksTo1970 + (1_000_000L * 
    1423                                                    tv.tv_sec + tv.tv_usec) * 10); 
     1422                                return DateTime.epoch1970 + 
     1423                                    TimeSpan.seconds(tv.tv_sec) + 
     1424                                    TimeSpan.microseconds(tv.tv_usec); 
    14241425                        } 
    14251426 
     
    16491650        struct Stamps 
    16501651        { 
    1651                 Time    created,        /// time created 
    1652                         accessed,       /// last time accessed 
    1653                         modified;       /// last time modified 
     1652                DateTime    created,        /// time created 
     1653                            accessed,       /// last time accessed 
     1654                            modified;       /// last time modified 
    16541655        } 
    16551656 
     
    17761777        ***********************************************************************/ 
    17771778 
    1778         abstract Time modified (); 
     1779        abstract DateTime modified (); 
    17791780 
    17801781        /*********************************************************************** 
     
    17851786        ***********************************************************************/ 
    17861787 
    1787         abstract Time accessed (); 
     1788        abstract DateTime accessed (); 
    17881789 
    17891790        /*********************************************************************** 
     
    17941795        ***********************************************************************/ 
    17951796 
    1796         abstract Time created (); 
     1797        abstract DateTime created (); 
    17971798 
    17981799        /*********************************************************************** 
  • trunk/tango/io/selector/AbstractSelector.d

    r2809 r2900  
    246246    public int select() 
    247247    { 
    248         return select(Interval.max); 
     248        return select(TimeSpan.max); 
     249    } 
     250 
     251    deprecated public int select(double timeout) 
     252    { 
     253            return select(timeout is timeout.max ? TimeSpan.max : TimeSpan.interval(timeout)); 
    249254    } 
    250255 
     
    265270     * wakeup() method has been called from another thread. 
    266271     */ 
    267     public abstract int select(Interval timeout); 
     272    public abstract int select(TimeSpan timeout); 
    268273 
    269274    /** 
     
    304309     * Cast the time duration to a C timeval struct. 
    305310    */ 
    306     public timeval* toTimeval(timeval* tv, Interval interval) 
     311    public timeval* toTimeval(timeval* tv, TimeSpan interval) 
    307312    in 
    308313    { 
     
    311316    body 
    312317    { 
    313         tv.tv_sec = cast(typeof(tv.tv_sec)) (interval)
    314         tv.tv_usec = cast(typeof(tv.tv_usec)) ((interval - tv.tv_sec) * 1_000_000); 
     318        tv.tv_sec = cast(typeof(tv.tv_sec)) interval.seconds
     319        tv.tv_usec = cast(typeof(tv.tv_usec)) (interval.microseconds % 1_000_000); 
    315320        return tv; 
    316321    } 
  • trunk/tango/io/selector/EpollSelector.d

    r2809 r2900  
    339339         * 
    340340         * Params: 
    341          * timeout  = Interval with the maximum amount of time that the 
     341         * timeout  = TimeSpan with the maximum amount of time that the 
    342342         *            selector will wait for events from the conduits; the 
    343343         *            amount of time is relative to the current system time 
     
    356356         * resources available to wait for events from the conduits. 
    357357         */ 
    358         public int select(Interval timeout) 
    359         { 
    360             int to = cast(int) (timeout != Interval.max ? cast(int) (timeout * 1000) : -1); 
     358        public int select(TimeSpan timeout) 
     359        { 
     360            int to = (timeout != TimeSpan.max ? cast(int) timeout.milliseconds : -1); 
    361361 
    362362            while (true) 
  • trunk/tango/io/selector/PollSelector.d

    r2809 r2900  
    292292         * 
    293293         * Params: 
    294          * timeout  = Interval with the maximum amount of time that the 
     294         * timeout  = Timespan with the maximum amount of time that the 
    295295         *            selector will wait for events from the conduits; the 
    296296         *            amount of time is relative to the current system time 
     
    309309         * resources available to wait for events from the conduits. 
    310310         */ 
    311         public int select(Interval timeout) 
    312         { 
    313             int to = cast(int) (timeout != Interval.max ? cast(int) (timeout * 1000) : -1); 
     311        public int select(TimeSpan timeout) 
     312        { 
     313            int to = (timeout != TimeSpan.max ? cast(int) timeout.milliseconds : -1); 
    314314 
    315315            debug (selector) 
  • trunk/tango/io/selector/SelectSelector.d

    r2873 r2900  
    411411     * 
    412412     * Params: 
    413      * timeout  = Interval with the maximum amount of time that the 
     413     * timeout  = TimeSpan with the maximum amount of time that the 
    414414     *            selector will wait for events from the conduits; the 
    415415     *            amount of time is relative to the current system time 
     
    428428     * resources available to wait for events from the conduits. 
    429429     */ 
    430     public int select(Interval timeout) 
     430    public int select(TimeSpan timeout) 
    431431    { 
    432432        fd_set *readfds; 
     
    435435        timeval tv; 
    436436 
    437         int to = cast(int) (timeout != Interval.max ? cast(int) (timeout * 1000) : -1); 
    438437 
    439438        debug (selector) 
    440             Stdout.format("--- SelectSelector.select(timeout={0} msec)\n", to); 
     439            Stdout.format("--- SelectSelector.select(timeout={0} msec)\n", timeout.milliseconds); 
    441440 
    442441        if (_readSet !is null) 
     
    472471 
    473472                // FIXME: add support for the wakeup() call. 
    474                 _eventCount = .select(_maxfd + 1, readfds, writefds, exceptfds, to is -1 ? null : &tv); 
     473                _eventCount = .select(_maxfd + 1, readfds, writefds, exceptfds, timeout is TimeSpan.max ? null : &tv); 
    475474 
    476475                debug (selector) 
     
    498497 
    499498            // FIXME: Can a system call be interrupted on Windows? 
    500             _eventCount = .select(ISelectable.Handle.max, readfds, writefds, exceptfds, to is -1 ? null : &tv); 
     499            _eventCount = .select(ISelectable.Handle.max, readfds, writefds, exceptfds, timeout is TimeSpan.max ? null : &tv); 
    501500 
    502501            debug (selector) 
  • trunk/tango/io/selector/model/ISelector.d

    r2809 r2900  
    99public import tango.io.model.IConduit; 
    1010 
    11 public import tango.core.Type : Interval
     11public import tango.core.TimeSpan
    1212 
    1313/** 
     
    400400     * 
    401401     * Params: 
    402      * timeout  = Interval with the maximum amount of time that the 
     402     * timeout  = TimeSpan with the maximum amount of time that the 
    403403     *            selector will wait for events from the conduits; the 
    404404     *            amount of time is relative to the current system time 
     
    410410     * have received events within the specified timeout. 
    411411     */ 
    412     public abstract int select(Interval timeout); 
     412    public abstract int select(TimeSpan timeout); 
     413 
     414    /* 
     415     * Deprecated: use select(TimeSpan) instead 
     416     * 
     417     * Params: 
     418     * timeout  = the maximum amount of time in seconds that the 
     419     *            selector will wait for events from the conduits; the 
     420     *            amount of time is relative to the current system time 
     421     *            (i.e. just the number of milliseconds that the selector 
     422     *            has to wait for the events). 
     423     * 
     424     * Returns: 
     425     * The amount of conduits that have received events; 0 if no conduits 
     426     * have received events within the specified timeout. 
     427     */ 
     428    deprecated public abstract int select(double timeout); 
    413429 
    414430    /** 
  • trunk/tango/net/Socket.d

    r2588 r2900  
    6767private import  tango.core.Exception; 
    6868 
    69 private import  tango.core.Type : Interval
     69private import  tango.core.TimeSpan
    7070 
    7171 
     
    13591359        ***********************************************************************/ 
    13601360 
    1361         static int select (SocketSet checkRead, SocketSet checkWrite, SocketSet checkError, Interval time) 
     1361        static int select (SocketSet checkRead, SocketSet checkWrite, SocketSet checkError, TimeSpan time) 
    13621362        { 
    13631363                auto tv = toTimeval (time); 
     
    13651365        } 
    13661366 
     1367        /*********************************************************************** 
     1368                select with specified timeout 
     1369           
     1370                Note: The period is not always accurate, so it is possible 
     1371                that the function will return with a timeout before the 
     1372                specified period.  For more accuracy, use the TimeSpan 
     1373                version. 
     1374        ***********************************************************************/ 
     1375 
     1376        static int select (SocketSet checkRead, SocketSet checkWrite, SocketSet checkError, double time) 
     1377        { 
     1378                return select(checkRead, checkWrite, checkError, TimeSpan.interval(time)); 
     1379        } 
     1380 
    13671381 
    13681382        /*********************************************************************** 
     
    13791393        /*********************************************************************** 
    13801394 
    1381                 Handy utility for converting Time into timeval 
    1382  
    1383         ***********************************************************************/ 
    1384  
    1385         static timeval toTimeval (Interval time) 
     1395                Handy utility for converting TimeSpan into timeval 
     1396 
     1397        ***********************************************************************/ 
     1398 
     1399        static timeval toTimeval (TimeSpan time) 
    13861400        { 
    13871401                timeval tv; 
    1388                 tv.tv_sec = cast(uint) time
    1389                 tv.tv_usec = cast(uint) ((time - tv.tv_sec) * 1_000_000.0)
     1402                tv.tv_sec = cast(uint) time.seconds
     1403                tv.tv_usec = cast(uint) time.microseconds % 1_000_000
    13901404                return tv; 
    13911405        } 
  • trunk/tango/net/SocketConduit.d

    r2739 r2900  
    1919private import  tango.net.Socket; 
    2020 
    21 private import  tango.core.Type : Interval
     21private import  tango.core.TimeSpan
    2222 
    2323/******************************************************************************* 
     
    121121        ***********************************************************************/ 
    122122 
    123         SocketConduit setTimeout (Interval interval) 
     123        SocketConduit setTimeout (TimeSpan interval) 
    124124        { 
    125125                tv = socket_.toTimeval (interval); 
    126126                return this; 
     127        } 
     128 
     129        deprecated SocketConduit setTimeout (double interval) 
     130        { 
     131                return setTimeout(TimeSpan.interval(interval)); 
    127132        } 
    128133 
  • trunk/tango/net/cluster/CacheInvalidator.d

    r2809 r2900  
    6464        ***********************************************************************/ 
    6565         
    66         void invalidate (char[] key, Time timeLimit = Time.max) 
     66        void invalidate (char[] key, DateTime timeLimit = DateTime.max) 
    6767        { 
    6868                assert (key.length); 
  • trunk/tango/net/cluster/NetworkClient.d

    r2878 r2900  
    9393        ***********************************************************************/ 
    9494         
    95         Time time () 
     95        DateTime time () 
    9696        { 
    9797                return Clock.now; 
  • trunk/tango/net/cluster/NetworkMessage.d

    r2878 r2900  
    4343class NetworkMessage : IMessage 
    4444{ 
    45         private uint    id_; 
    46         private long    time_; 
    47         private char[]  reply_; 
     45        private uint      id_; 
     46        private DateTime  time_; 
     47        private char[]    reply_; 
    4848 
    4949        /*********************************************************************** 
     
    9898        ***********************************************************************/ 
    9999 
    100         void time (Time time) 
     100        void time (DateTime time) 
    101101        { 
    102102                time_ = time; 
     
    109109        ***********************************************************************/ 
    110110 
    111         Time time () 
     111        DateTime time () 
    112112        { 
    113                 return cast(Time) time_; 
     113                return time_; 
    114114        } 
    115115 
     
    140140        void read (IReader input) 
    141141        {        
    142                 input (id_) (time_) (reply_); 
     142                input (id_) (time_.ticks) (reply_); 
    143143        } 
    144144 
     
    151151        void write (IWriter output) 
    152152        { 
    153                 output (id_) (time_) (reply_); 
     153                output (id_) (time_.ticks) (reply_); 
    154154        } 
    155155 
  • trunk/tango/net/cluster/QueuedCache.d

    r2809 r2900  
    1313module tango.net.cluster.QueuedCache; 
    1414 
    15 private import tango.core.Type : Time; 
     15private import tango.util.time.DateTime; 
    1616 
    1717private import tango.net.cluster.model.ICache; 
     
    116116        **********************************************************************/ 
    117117 
    118         synchronized bool put (K key, V value, Time time = Time.init) 
     118        synchronized bool put (K key, V value, DateTime time = DateTime.init) 
    119119        { 
    120120                assert (key !is key.init); 
     
    138138        **********************************************************************/ 
    139139 
    140         synchronized bool put (K peek, K delegate() key, V delegate() value, Time time = Time.init) 
     140        synchronized bool put (K peek, K delegate() key, V delegate() value, DateTime time = DateTime.init) 
    141141        { 
    142142                assert (peek !is peek.init); 
     
    162162        **********************************************************************/ 
    163163 
    164         synchronized V remove (K key, Time time = Time.max) 
     164        synchronized V remove (K key, DateTime time = DateTime.max) 
    165165        { 
    166166                auto e = lookup (key); 
     
    171171                   // don't actually kill the list entry -- just place 
    172172                   // it at the list 'tail' ready for subsequent reuse 
    173                    deReference(e).set (K.init, V.init, Time.min); 
     173                   deReference(e).set (K.init, V.init, DateTime.min); 
    174174 
    175175                   map.remove (key); 
     
    288288                QueuedEntry*    prev, 
    289289                                next; 
    290                 Time            time; 
     290                DateTime        time; 
    291291                V               value; 
    292292 
     
    297297                **************************************************************/ 
    298298 
    299                 QueuedEntry* set (K key, V value, Time time) 
     299                QueuedEntry* set (K key, V value, DateTime time) 
    300300                { 
    301301&n