Checkpoint
diff --git a/ns3/sync-scheduler.cc b/ns3/sync-scheduler.cc
new file mode 100644
index 0000000..b236c02
--- /dev/null
+++ b/ns3/sync-scheduler.cc
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "sync-scheduler.h"
+#include "sync-log.h"
+
+#include "ns3/simulator.h"
+
+using namespace boost;
+using namespace std;
+
+INIT_LOGGER ("Scheduler");
+
+namespace Sync {
+
+Scheduler::Scheduler ()
+{
+}
+
+Scheduler::~Scheduler ()
+{
+}
+
+void
+Scheduler::schedule (const boost::posix_time::time_duration &reltime, Event event, uint32_t label)
+{
+  ns3::Seconds (reltime.total_seconds()) + ns3::MilliSeconds (reltime.milliseconds ()) + ns3::MicroSeconds (reltime.microseconds ());
+}
+
+void
+Scheduler::cancel (uint32_t label)
+{
+  // {
+  //   // cout << "Canceling label " << label << " size: " << m_events.size () << endl;
+  //   lock_guard<mutex> lock (m_eventsMutex);
+  //   m_events.get<byLabel> ().erase (label);
+  //   // cout << "Canceled label " << label << " size: " << m_events.size () << endl;
+  // }
+  // m_eventsCondition.notify_one ();
+  // m_thread.interrupt (); // interrupt sleep, if currently sleeping
+}
+
+
+} // Sync
diff --git a/ns3/sync-scheduler.h b/ns3/sync-scheduler.h
new file mode 100644
index 0000000..d3b536a
--- /dev/null
+++ b/ns3/sync-scheduler.h
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef SYNC_SCHEDULER_H
+#define SYNC_SCHEDULER_H
+
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include "sync-event.h"
+
+namespace Sync {
+
+/**
+ * @ingroup sync
+ * @brief General purpose event scheduler
+ *
+ * This class internally runs a thread and events can be scheduled by specifying an absolute or relative time of the event
+ */
+class Scheduler
+{
+public:
+  /**
+   * @brief Default constructor. Thread will be created
+   */
+  Scheduler ();
+  /**
+   * @brief Destructor. Thread will be nicely stopped
+   */
+  ~Scheduler ();
+
+  /**
+   * @brief Schedule an event at absolute time 'abstime'
+   * @param abstime Absolute time
+   * @param event function to be called at the time
+   * @param label Label for the event
+   */
+  // void
+  // schedule (const boost::system_time &abstime, Event event, uint32_t label);
+
+  /**
+   * @brief Schedule an event at relative time 'reltime'
+   * @param reltime Relative time
+   * @param event function to be called at the time
+   * @param label Label for the event
+   */
+  void
+  schedule (const boost::posix_time::time_duration &reltime, Event event, uint32_t label); 
+
+  /**
+   * @brief Cancel all events for the label
+   * @param label Label of the event that needs to be cancelled
+   */
+  void
+  cancel (uint32_t label);
+};
+  
+}
+
+#endif // SYNC_SCHEDULER_H