Changeset 1049

Show
Ignore:
Timestamp:
11/23/07 20:36:34 (1 year ago)
Author:
kris
Message:

updates required for DateTime? changes. This sucks, because now some interfaces have to import DateTime?, which also imports a bunch of other implementation. Can't be doing that in a Tango interface ...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/mango/net/servlet/Servlet.d

    r1047 r1049  
    1313module mango.net.servlet.Servlet; 
    1414 
    15 private import  tango.core.TimeSpan
     15private import  tango.util.time.DateTime
    1616 
    1717public  import  tango.net.http.HttpConst, 
     
    159159 
    160160                overridable implementation of getLastModified() returns 
    161                 Time.zero to say it doesn't know. 
    162  
    163         **********************************************************************/ 
    164  
    165         TimeSpan getLastModified (IServletRequest request) 
    166         { 
    167                 return TimeSpan.zero
     161                DateTime.epoch to say it doesn't know. 
     162 
     163        **********************************************************************/ 
     164 
     165        DateTime getLastModified (IServletRequest request) 
     166        { 
     167                return DateTime.epoch
    168168        } 
    169169 
     
    182182        { 
    183183                auto lastModified = getLastModified (request); 
    184                 if (lastModified is TimeSpan.zero)  
     184                if (lastModified is DateTime.epoch)  
    185185                    doGet (request, response); 
    186186                else 
    187187                   {     
    188                    auto ifModifiedSince = request.headers.getDate (HttpHeader.IfModifiedSince); 
    189                    if (lastModified - ifModifiedSince > Time.TicksPerSecond)  
     188                   // auto ifModifiedSince = request.headers.getDate (HttpHeader.IfModifiedSince); 
     189                   // if (lastModified - ifModifiedSince > Time.TicksPerSecond)  
     190                   auto span = lastModified - request.headers.getDate (HttpHeader.IfModifiedSince); 
     191                   if (span.seconds > 1)  
    190192                      { 
    191193                      response.headers.addDate (HttpHeader.LastModified, lastModified); 
  • trunk/mango/net/util/cache/Payload.d

    r1047 r1049  
    3535        ***********************************************************************/ 
    3636 
    37         Time time () 
     37        long time () 
    3838        { 
    39                 return cast(Time) time_; 
     39                return time_; 
    4040        } 
    4141 
     
    4646        ***********************************************************************/ 
    4747 
    48         void time (Time time) 
     48        void time (long time) 
    4949        { 
    5050                time_ = time; 
  • trunk/mango/net/util/cache/PlainCache.d

    r987 r1049  
    9393        **********************************************************************/ 
    9494 
    95         ICached extract (char[] key, Time timeLimit) 
     95        ICached extract (char[] key, long timeLimit) 
    9696        { 
    9797                // cast to void* first to avoid overhead 
     
    137137                        ICached get (char[] key) 
    138138                        { 
    139                                 Time t; 
     139                                long t; 
    140140 
    141141                                auto p = cache.get (key); 
  • trunk/mango/net/util/cache/QueuedCache.d

    r1047 r1049  
    122122        **********************************************************************/ 
    123123 
    124         override ICached extract (char[] key, Time timeLimit = Time.max) 
     124        override ICached extract (char[] key, long timeLimit = long.max) 
    125125        in { 
    126126           assert (key.length); 
  • trunk/mango/net/util/cache/model/ICache.d

    r1034 r1049  
    4848        **********************************************************************/ 
    4949 
    50         ICached extract (char[] key, Time timeLimit = Time.max); 
     50        ICached extract (char[] key, long timeLimit = long.max); 
    5151 
    5252        /********************************************************************** 
     
    115115        **********************************************************************/ 
    116116 
    117         ICached load (char[] key, Time time); 
     117        ICached load (char[] key, long time); 
    118118} 
    119119 
  • trunk/mango/net/util/cache/model/ICached.d

    r988 r1049  
    1212 
    1313module mango.net.util.cache.model.ICached; 
    14  
    15 public import tango.core.Type : Time; 
    1614 
    1715/****************************************************************************** 
     
    2927        ***********************************************************************/ 
    3028 
    31         Time time (); 
     29        long time (); 
    3230}