Index: server/server.cpp
===================================================================
--- server/server.cpp	(revision a72bbde27b8c585448ba8723872ffc808c28e0a8)
+++ server/server.cpp	(revision 430c80efc54b086c29b44179deb51d7ee9382ac8)
@@ -74,23 +74,4 @@
 
    return NULL;
-}
-
-void broadcastPlayerPositions(map<unsigned int, Player> &m, int sock)
-{
-   map<unsigned int, Player>::iterator it, it2;
-   NETWORK_MSG serverMsg;
-
-   serverMsg.type = MSG_TYPE_PLAYER;   
-
-   for (it = m.begin(); it != m.end(); it++)
-   {
-      it->second.serialize(serverMsg.buffer);
-
-      for (it2 = m.begin(); it2 != m.end(); it2++)
-      {
-         if ( sendMessage(&serverMsg, sock, &(it2->second.addr)) < 0 )
-            error("sendMessage");
-      }
-   }
 }
 
@@ -129,5 +110,5 @@
    bool broadcastResponse;
    timespec ts;
-   long timeLastUpdated = 0, curTime = 0, timeLastBroadcast = 0;
+   int timeLastUpdated = 0, curTime = 0, timeLastBroadcast = 0;
    while (true) {
 
@@ -135,7 +116,9 @@
 
       clock_gettime(CLOCK_REALTIME, &ts);
-      curTime = ts.tv_sec + ts.tv_nsec*1000000000;
-
-      if (timeLastUpdated == 0 || (curTime-timeLastUpdated) >= 50000) {
+      // make the number smaller so millis can fit in an int
+      ts.tv_sec = ts.tv_sec & 0x3fffff;
+      curTime = ts.tv_sec*1000 + ts.tv_nsec/1000000;
+
+      if (timeLastUpdated == 0 || (curTime-timeLastUpdated) >= 50) {
          timeLastUpdated = curTime;
 
