Project

General

Profile

Revision 75cef49f

ID75cef49f2a08dfb4c66350af15f3a83163f1f021
Parent e680f143
Child 880dc54f

Added by Thomas Mullins about 11 years ago

Added query_add_event to mainbox code

View differences:

mainbox/main.c
5 5
#include <strings.h>
6 6
#include <stdio.h>
7 7

  
8
#define SLEEP_MS 250
8
#define SLEEP_MS 10//250
9 9

  
10 10
static struct tool_t tools[] = {
11
  TOOL_DECL("testa", 4),
12
  TOOL_DECL("testb", 5)
11
  TOOL_DECL("test1", 1),
12
  TOOL_DECL("test2", 2),
13
  TOOL_DECL("test3", 3),
14
  TOOL_DECL("test4", 4),
15
  TOOL_DECL("test5", 5),
16
  TOOL_DECL("test6", 6),
17
  TOOL_DECL("test7", 7),
18
  TOOL_DECL("test8", 8),
19
  TOOL_DECL("test9", 9)
13 20
};
14 21

  
15 22
#define N_TOOLS (sizeof(tools)/sizeof(struct tool_t))
......
74 81
  i = 0;
75 82
  while (run) {
76 83
    tool_poll(&tools[i]);
84
    event_q_process();
77 85
    usleep(SLEEP_MS * (useconds_t)1000);
78 86
    i = (i+1) % N_TOOLS;
79 87
  }

Also available in: Unified diff