Răsfoiți Sursa

whoops, atomicAdjust et al needs to be in express

David Rose 20 ani în urmă
părinte
comite
0e3f5c068a

+ 13 - 14
panda/src/downloader/httpChannel.cxx

@@ -24,7 +24,6 @@
 #include "chunkedStream.h"
 #include "identityStream.h"
 #include "config_downloader.h"
-#include "clockObject.h"
 #include "ramfile.h"
 
 #ifdef HAVE_OPENSSL
@@ -348,7 +347,7 @@ run() {
 
   if (_started_download) {
     if (_nonblocking && _download_throttle) {
-      double now = ClockObject::get_global_clock()->get_real_time();
+      double now = TrueClock::get_global_ptr()->get_short_time();
       double elapsed = now - _last_run_time;
       if (elapsed < _seconds_per_update) {
         // Come back later.
@@ -427,7 +426,7 @@ run() {
       
       _state = S_connecting;
       _started_connecting_time = 
-        ClockObject::get_global_clock()->get_real_time();
+        TrueClock::get_global_ptr()->get_short_time();
       _connect_count++;
     }
 
@@ -829,7 +828,7 @@ reached_done_state() {
         _body_stream = NULL;
       }
       _started_download = true;
-      _last_run_time = ClockObject::get_global_clock()->get_real_time();
+      _last_run_time = TrueClock::get_global_ptr()->get_short_time();
       return true;
     }
   }
@@ -962,7 +961,7 @@ run_connecting_wait() {
   if (errcode == 0) {
     // Nothing's happened so far; come back later.
     if (get_blocking_connect() ||
-        (ClockObject::get_global_clock()->get_real_time() - 
+        (TrueClock::get_global_ptr()->get_short_time() - 
          _started_connecting_time > get_connect_timeout())) {
       // Time to give up.
       downloader_cat.info()
@@ -998,7 +997,7 @@ run_http_proxy_ready() {
     
   // All done sending request.
   _state = S_http_proxy_request_sent;
-  _sent_request_time = ClockObject::get_global_clock()->get_real_time();
+  _sent_request_time = TrueClock::get_global_ptr()->get_short_time();
   return false;
 }
 
@@ -1116,7 +1115,7 @@ run_socks_proxy_greet() {
   if (!server_send(string(socks_greeting, socks_greeting_len), true)) {
     return true;
   }
-  _sent_request_time = ClockObject::get_global_clock()->get_real_time();
+  _sent_request_time = TrueClock::get_global_ptr()->get_short_time();
     
   // All done sending request.
   _state = S_socks_proxy_greet_reply;
@@ -1206,7 +1205,7 @@ run_socks_proxy_connect() {
   if (!server_send(connect, true)) {
     return true;
   }
-  _sent_request_time = ClockObject::get_global_clock()->get_real_time();
+  _sent_request_time = TrueClock::get_global_ptr()->get_short_time();
     
   _state = S_socks_proxy_connect_reply;
   return false;
@@ -1410,7 +1409,7 @@ run_setup_ssl() {
   // We start the connect timer over again when we reach the SSL
   // handshake.
   _started_connecting_time = 
-    ClockObject::get_global_clock()->get_real_time();
+    TrueClock::get_global_ptr()->get_short_time();
 
   return false;
 }
@@ -1427,7 +1426,7 @@ run_ssl_handshake() {
   if (BIO_do_handshake(_sbio) <= 0) {
     if (BIO_should_retry(_sbio)) {
       double elapsed =
-        ClockObject::get_global_clock()->get_real_time() -
+        TrueClock::get_global_ptr()->get_short_time() -
         _started_connecting_time;
       if (elapsed <= get_connect_timeout()) {
         // Keep trying.
@@ -1577,7 +1576,7 @@ run_ready() {
     
   // All done sending request.
   _state = S_request_sent;
-  _sent_request_time = ClockObject::get_global_clock()->get_real_time();
+  _sent_request_time = TrueClock::get_global_ptr()->get_short_time();
   return false;
 }
 
@@ -1635,7 +1634,7 @@ run_reading_header() {
 
     } else {
       double elapsed =
-        ClockObject::get_global_clock()->get_real_time() -
+        TrueClock::get_global_ptr()->get_short_time() -
         _sent_request_time;
       if (elapsed > get_http_timeout()) {
         // Time to give up.
@@ -2429,7 +2428,7 @@ server_getline_failsafe(string &str) {
 
     } else {
       double elapsed =
-        ClockObject::get_global_clock()->get_real_time() -
+        TrueClock::get_global_ptr()->get_short_time() -
         _sent_request_time;
       if (elapsed > get_http_timeout()) {
         // Time to give up.
@@ -2502,7 +2501,7 @@ server_get_failsafe(string &str, size_t num_bytes) {
       
     } else {
       double elapsed =
-        ClockObject::get_global_clock()->get_real_time() -
+        TrueClock::get_global_ptr()->get_short_time() -
         _sent_request_time;
       if (elapsed > get_http_timeout()) {
         // Time to give up.

+ 2 - 2
panda/src/downloader/socketStream.I

@@ -153,7 +153,7 @@ consider_flush() {
 
   } else {
     double elapsed = 
-      ClockObject::get_global_clock()->get_real_time() - _queued_data_start;
+      TrueClock::get_global_ptr()->get_short_time() - _queued_data_start;
     // If the elapsed time is negative, someone must have reset the
     // clock back, so just go ahead and flush.
     if (elapsed < 0.0 || elapsed >= _collect_tcp_interval) {
@@ -174,7 +174,7 @@ consider_flush() {
 INLINE bool SSWriter::
 flush() {
   _ostream->flush();
-  _queued_data_start = ClockObject::get_global_clock()->get_real_time();
+  _queued_data_start = TrueClock::get_global_ptr()->get_short_time();
   return !is_closed();
 }
 

+ 2 - 2
panda/src/downloader/socketStream.cxx

@@ -132,7 +132,7 @@ void SSReader::
 delay_datagram(const Datagram &datagram) {
   nassertv(_delay_active);
 
-  double now = ClockObject::get_global_clock()->get_frame_time();
+  double now = TrueClock::get_global_ptr()->get_short_time();
   double reveal_time = now + _min_delay;
   
   if (_delay_variance > 0.0) {
@@ -160,7 +160,7 @@ get_delayed(Datagram &datagram) {
   }
   const DelayedDatagram &dd = _delayed.front();
   if (_delay_active) {
-    double now = ClockObject::get_global_clock()->get_frame_time();
+    double now = TrueClock::get_global_ptr()->get_short_time();
     if (dd._reveal_time > now) {
       // Not yet.
       return false;

+ 1 - 1
panda/src/downloader/socketStream.h

@@ -20,7 +20,7 @@
 #define SOCKETSTREAM_H
 
 #include "pandabase.h"
-#include "clockObject.h"
+#include "trueClock.h"
 #include "config_express.h" // for collect_tcp
 #include "datagram.h"
 #include "pdeque.h"

+ 14 - 0
panda/src/express/Sources.pp

@@ -9,6 +9,11 @@
   #define COMBINED_SOURCES $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx
 
   #define SOURCES \
+    atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I atomicAdjust.h \
+    atomicAdjust.I atomicAdjustImpl.h \
+    atomicAdjustNsprImpl.h atomicAdjustNsprImpl.I \
+    atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
+    atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
     bigEndian.h buffer.I buffer.h \
     checksumHashGenerator.I checksumHashGenerator.h circBuffer.I \
     circBuffer.h \
@@ -66,6 +71,10 @@
     zStream.I zStream.h zStreamBuf.h
 
   #define INCLUDED_SOURCES  \
+    atomicAdjust.cxx atomicAdjustDummyImpl.cxx \
+    atomicAdjustNsprImpl.cxx \
+    atomicAdjustPosixImpl.cxx \
+    atomicAdjustWin32Impl.cxx \
     buffer.cxx checksumHashGenerator.cxx \
     config_express.cxx \
     datagram.cxx datagramGenerator.cxx \
@@ -110,6 +119,11 @@
     zStream.cxx zStreamBuf.cxx
 
   #define INSTALL_HEADERS  \
+    atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I atomicAdjust.h \
+    atomicAdjust.I atomicAdjustImpl.h \
+    atomicAdjustNsprImpl.h atomicAdjustNsprImpl.I \
+    atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
+    atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
     bigEndian.h buffer.I buffer.h \
     checksumHashGenerator.I checksumHashGenerator.h circBuffer.I \
     circBuffer.h \

+ 0 - 0
panda/src/pipeline/atomicAdjust.I → panda/src/express/atomicAdjust.I


+ 0 - 0
panda/src/pipeline/atomicAdjust.cxx → panda/src/express/atomicAdjust.cxx


+ 0 - 0
panda/src/pipeline/atomicAdjust.h → panda/src/express/atomicAdjust.h


+ 0 - 0
panda/src/pipeline/atomicAdjustDummyImpl.I → panda/src/express/atomicAdjustDummyImpl.I


+ 0 - 0
panda/src/pipeline/atomicAdjustDummyImpl.cxx → panda/src/express/atomicAdjustDummyImpl.cxx


+ 0 - 0
panda/src/pipeline/atomicAdjustDummyImpl.h → panda/src/express/atomicAdjustDummyImpl.h


+ 0 - 0
panda/src/pipeline/atomicAdjustImpl.h → panda/src/express/atomicAdjustImpl.h


+ 0 - 0
panda/src/pipeline/atomicAdjustNsprImpl.I → panda/src/express/atomicAdjustNsprImpl.I


+ 0 - 0
panda/src/pipeline/atomicAdjustNsprImpl.cxx → panda/src/express/atomicAdjustNsprImpl.cxx


+ 0 - 0
panda/src/pipeline/atomicAdjustNsprImpl.h → panda/src/express/atomicAdjustNsprImpl.h


+ 0 - 0
panda/src/pipeline/atomicAdjustPosixImpl.I → panda/src/express/atomicAdjustPosixImpl.I


+ 0 - 0
panda/src/pipeline/atomicAdjustPosixImpl.cxx → panda/src/express/atomicAdjustPosixImpl.cxx


+ 0 - 0
panda/src/pipeline/atomicAdjustPosixImpl.h → panda/src/express/atomicAdjustPosixImpl.h


+ 0 - 0
panda/src/pipeline/atomicAdjustWin32Impl.I → panda/src/express/atomicAdjustWin32Impl.I


+ 0 - 0
panda/src/pipeline/atomicAdjustWin32Impl.cxx → panda/src/express/atomicAdjustWin32Impl.cxx


+ 0 - 0
panda/src/pipeline/atomicAdjustWin32Impl.h → panda/src/express/atomicAdjustWin32Impl.h


+ 5 - 0
panda/src/express/express_composite1.cxx

@@ -1,3 +1,8 @@
+#include "atomicAdjust.cxx"
+#include "atomicAdjustDummyImpl.cxx"
+#include "atomicAdjustNsprImpl.cxx"
+#include "atomicAdjustPosixImpl.cxx"
+#include "atomicAdjustWin32Impl.cxx"
 #include "buffer.cxx"
 #include "checksumHashGenerator.cxx"
 #include "config_express.cxx"

+ 0 - 14
panda/src/pipeline/Sources.pp

@@ -8,11 +8,6 @@
   #define COMBINED_SOURCES $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx
 
   #define SOURCES \
-    atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I atomicAdjust.h \
-    atomicAdjust.I atomicAdjustImpl.h \
-    atomicAdjustNsprImpl.h atomicAdjustNsprImpl.I \
-    atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
-    atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
     conditionVar.h conditionVar.I \
     conditionVarDebug.h conditionVarDebug.I \
     conditionVarDirect.h conditionVarDirect.I \
@@ -51,10 +46,6 @@
     threadPriority.h
 
   #define INCLUDED_SOURCES  \
-    atomicAdjust.cxx atomicAdjustDummyImpl.cxx \
-    atomicAdjustNsprImpl.cxx \
-    atomicAdjustPosixImpl.cxx \
-    atomicAdjustWin32Impl.cxx \
     conditionVar.cxx \
     conditionVarDebug.cxx \
     conditionVarDirect.cxx \
@@ -89,11 +80,6 @@
     threadWin32Impl.cxx
 
   #define INSTALL_HEADERS  \
-    atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I atomicAdjust.h \
-    atomicAdjust.I atomicAdjustImpl.h \
-    atomicAdjustNsprImpl.h atomicAdjustNsprImpl.I \
-    atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I \
-    atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I \
     conditionVar.h conditionVar.I \
     conditionVarDebug.h conditionVarDebug.I \
     conditionVarDirect.h conditionVarDirect.I \

+ 0 - 5
panda/src/pipeline/pipeline_composite1.cxx

@@ -1,8 +1,3 @@
-#include "atomicAdjust.cxx"
-#include "atomicAdjustDummyImpl.cxx"
-#include "atomicAdjustNsprImpl.cxx"
-#include "atomicAdjustPosixImpl.cxx"
-#include "atomicAdjustWin32Impl.cxx"
 #include "conditionVar.cxx"
 #include "conditionVarDebug.cxx"
 #include "conditionVarDirect.cxx"