import SocketServer


class DjangoServer(SocketServer.ThreadingTCPServer):
    allow_reuse_address = True

    def __init__(self, judges, *args, **kwargs):
        SocketServer.ThreadingTCPServer.__init__(self, *args, **kwargs)
        self.judges = judges
        import threading
        self.ping_thread = threading.Thread(target=self.ping, args=())
        self.ping_thread.start()

    def ping(self):
        while True:
            for judge in self.judges:
                judge._send({'name': 'ping'})
            import time
            time.sleep(0.2)

@@ -1,12 +1,41 @@
+import threading%0Aimport time%0A
 import Socke
@@ -42,16 +42,16 @@
 tServer%0A
-
 %0A%0Aclass 
@@ -283,33 +283,8 @@
 ges%0A
-        import threading%0A
     
@@ -509,10 +509,9 @@
 ing'
-%7D)
+,
 %0A   
@@ -519,27 +519,54 @@
         
-import time
+                 'when': time.time()%7D)
 %0A       

Update djangoserver.py