Index: trunk/FACT++/src/ftm.cc
===================================================================
--- trunk/FACT++/src/ftm.cc	(revision 10822)
+++ trunk/FACT++/src/ftm.cc	(revision 10823)
@@ -57,13 +57,11 @@
     }
 
-    ba::deadline_timer deadline_;
-
     ba::deadline_timer fTriggerDynData;
 
     // The constructor is prvate to force the obtained pointer to be shared
     tcp_connection(ba::io_service& ioservice) : ba::ip::tcp::socket(ioservice),
-        deadline_(ioservice), fTriggerDynData(ioservice)
-    {
-        deadline_.expires_at(boost::posix_time::pos_infin);
+        fTriggerDynData(ioservice)
+    {
+        //deadline_.expires_at(boost::posix_time::pos_infin);
 
         fHeader.fDelimiter=kDelimiterStart;
@@ -178,5 +176,5 @@
         fHeader.fDataSize=sizeof(FTM::DynamicData)/2+1;
         fHeader.fTriggerCounter = fCounter++;
-        fHeader.fTimeStamp = fTimeStamp++;//lrint(Time().UnixTime());
+        fHeader.fTimeStamp = fTimeStamp++*1000000;//lrint(Time().UnixTime());
 
         fBufHeader      = fHeader.HtoN();
@@ -193,5 +191,5 @@
         fHeader.fDataSize=sizeof(FTM::StaticData)/2+1;
         fHeader.fTriggerCounter = fCounter++;
-        fHeader.fTimeStamp = fTimeStamp;//lrint(Time().UnixTime());
+        fHeader.fTimeStamp = fTimeStamp*1000000;//lrint(Time().UnixTime());
 
         for (int i=0; i<4; i++)
@@ -213,5 +211,4 @@
             // Close the connection
             close();
-            deadline_.cancel();
             return;
         }
@@ -246,5 +243,5 @@
                 fHeader.fDataSize=sizeof(FTM::FtuList)/2+1;
                 fHeader.fTriggerCounter = fCounter++;
-                fHeader.fTimeStamp = fTimeStamp;//lrint(Time().UnixTime());
+                fHeader.fTimeStamp = fTimeStamp*1000000;//lrint(Time().UnixTime());
 
                 fFtuList[1].fPingAddr = ((rand()&1)<<9) | 1;
@@ -369,5 +366,5 @@
                 fHeader.fDataSize=2;
                 fHeader.fTriggerCounter = fCounter++;
-                fHeader.fTimeStamp = fTimeStamp;//lrint(Time().UnixTime());
+                fHeader.fTimeStamp = fTimeStamp*1000000;//lrint(Time().UnixTime());
 
                 fBufHeader = fHeader.HtoN();
@@ -410,5 +407,5 @@
     }
 
-    void check_deadline(const boost::system::error_code &)
+    void SendDynData(const boost::system::error_code &)
     {
         if (!is_open())
@@ -419,35 +416,13 @@
         }
 
+        if (ec==ba::error::basic_errors::operation_aborted)
+            return;
+
         // Check whether the deadline has passed. We compare the deadline
         // against the current time since a new asynchronous operation
         // may have moved the deadline before this actor had a chance
         // to run.
-        if (deadline_.expires_at() <= ba::deadline_timer::traits_type::now())
-        {
-            // The deadline has passed. Stop the session. The other
-            // actors will terminate as soon as possible.
-//            AsyncWrite(ba::buffer(ba::const_buffer(&fHeader, sizeof(FTM::Header))));
-//            AsyncWait(deadline_, 3, &tcp_connection::check_deadline);
-
-            return;
-        }
-
-        AsyncWait(deadline_, 3, &tcp_connection::check_deadline);
-    }
-
-    void SendDynData(const boost::system::error_code &)
-    {
-        if (!is_open())
-        {
-            // For example: Here we could schedule a new accept if we
-            // would not want to allow two connections at the same time.
-            return;
-        }
-
-        // Check whether the deadline has passed. We compare the deadline
-        // against the current time since a new asynchronous operation
-        // may have moved the deadline before this actor had a chance
-        // to run.
-        if (deadline_.expires_at() <= ba::deadline_timer::traits_type::now())
+
+        if (fTriggerDynData.expires_at() > ba::deadline_timer::traits_type::now())
             return;
 
@@ -456,5 +431,4 @@
 
         AsyncWait(fTriggerDynData, 1, &tcp_connection::SendDynData);
-        return;
     }
 
