Project

General

Profile

Revision 409

reduced colonet server cpu usage to near zero

View differences:

colonet_wireless.cpp
116 116
    wl_send_robot_to_robot_global_packet(COLONET_PACKET_GROUP_ID, (char)msg_type, (char*)(&pkt),
117 117
                                         sizeof(ColonetRobotServerPacket), dest, COLONET_RESPONSE_PACKET_FRAME_ID);
118 118
  }
119

  
120
  return 0;
119 121
}
120 122

  
121 123
int colonet_get_num_robots(void) {
......
210 212

  
211 213
  while (1) {
212 214
    wl_do();
213
    usleep(50000);
215
    usleep(1000);
214 216
  }
215 217

  
216 218
  wl_terminate();
217
  pthread_exit(NULL);
218 219
  return NULL;
219 220
}
220 221

  

Also available in: Unified diff