Index: /trunk/BNC/bnccaster.cpp
===================================================================
--- /trunk/BNC/bnccaster.cpp	(revision 381)
+++ /trunk/BNC/bnccaster.cpp	(revision 382)
@@ -93,4 +93,9 @@
     _waitTime = 1;
   }
+
+  // Start dump epoch loop
+  // ---------------------
+  _newTime = 0;
+  dumpEpochSlot();
 }
 
@@ -133,5 +138,5 @@
 
   long iSec    = long(floor(obs->GPSWeeks+0.5));
-  long newTime = obs->GPSWeek * 7*24*3600 + iSec;
+  _newTime = obs->GPSWeek * 7*24*3600 + iSec;
 
   // Rename the Station
@@ -150,15 +155,15 @@
     rnx->deepCopy(obs);
   }
-  rnx->dumpEpoch(newTime);
+  rnx->dumpEpoch(_newTime);
 
   // First time, set the _lastDumpSec immediately
   // --------------------------------------------
   if (_lastDumpSec == 0) {
-    _lastDumpSec = newTime - 1;
+    _lastDumpSec = _newTime - 1;
   }
 
   // An old observation - throw it away
   // ----------------------------------
-  if (newTime <= _lastDumpSec) {
+  if (_newTime <= _lastDumpSec) {
     if (firstObs) {
       QSettings settings;
@@ -175,13 +180,18 @@
   // Save the observation
   // --------------------
-  _epochs->insert(newTime, obs);
-
-  // Dump older epochs
-  // -----------------
-  dumpEpochs(_lastDumpSec + 1, newTime - _waitTime);
-
-  if (_lastDumpSec < newTime - _waitTime) {
-    _lastDumpSec = newTime - _waitTime;
-  }
+  _epochs->insert(_newTime, obs);
+}
+
+// Dump Loop Event
+////////////////////////////////////////////////////////////////////////////
+void bncCaster::dumpEpochSlot() {
+  if (_newTime != 0 && _epochs->size() > 0) {
+    dumpEpochs(_lastDumpSec + 1, _newTime - _waitTime);
+
+    if (_lastDumpSec < _newTime - _waitTime) {
+      _lastDumpSec = _newTime - _waitTime;
+    }
+  }
+  QTimer::singleShot(100, this, SLOT(dumpEpochSlot()));
 }
 
@@ -282,9 +292,9 @@
               sock->write(&begEpoch, 1);
             }
-            sock->write(&begObs, 1);
-            sock->write((char*) obs, numBytes);
-            if (!it.hasNext()) {
-              sock->write(&endEpoch, 1);
-            }
+////            sock->write(&begObs, 1);
+////            sock->write((char*) obs, numBytes);
+////            if (!it.hasNext()) {
+////              sock->write(&endEpoch, 1);
+////            }
           }
         }
Index: /trunk/BNC/bnccaster.h
===================================================================
--- /trunk/BNC/bnccaster.h	(revision 381)
+++ /trunk/BNC/bnccaster.h	(revision 382)
@@ -57,4 +57,5 @@
    void slotNewConnection();
    void slotGetThreadError(const QByteArray& staID);
+   void dumpEpochSlot();
 
  private:
@@ -74,4 +75,5 @@
    long                           _waitTime;
    QMutex                         _mutex;
+   long                           _newTime;
 };
 
Index: /trunk/BNC/test_bnc_qt.cpp
===================================================================
--- /trunk/BNC/test_bnc_qt.cpp	(revision 381)
+++ /trunk/BNC/test_bnc_qt.cpp	(revision 382)
@@ -31,4 +31,5 @@
     if ( socket.bytesAvailable() ) {
       int bytesRecv = socket.read(&flag, 1);
+      cout << flag << endl;
       if (flag == begObs) {
         if ( socket.bytesAvailable() >= sizeof(obs) ) {
