COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
agent_time.cpp File Reference
Include dependency graph for agent_time.cpp:

Functions

int main (int argc, char *argv[])
 

Function Documentation

int main ( int  argc,
char *  argv[] 
)
39 {
40  Agent * agent;
41 
42  if (argc == 2)
43  {
44  agent = new Agent("", argv[1]);
45  }
46  else
47  {
48  agent = new Agent("", "ntp");
49  }
50 
51  while (agent->running())
52  {
53  COSMOS_SLEEP(5.);
54  }
55 
56  agent->shutdown();
57 }
uint16_t running()
Check if we're supposed to be running.
Definition: agentclass.cpp:391
static Agent * agent
ensure the Agent constructor creates only one instance per process
Definition: agent_001.cpp:45
Definition: agentclass.h:139
int32_t shutdown()
Shutdown agent gracefully.
Definition: agentclass.cpp:366