|
@@ -17,6 +17,7 @@
|
|
#include <stdexcept>
|
|
#include <stdexcept>
|
|
#include <stdlib.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <string.h>
|
|
|
|
+#include <sys/time.h>
|
|
|
|
|
|
#include <iostream>
|
|
#include <iostream>
|
|
|
|
|
|
@@ -66,8 +67,7 @@ CommandSession::getCommand(int counter) {
|
|
ElementPtr>());
|
|
ElementPtr>());
|
|
gettimeofday(&now, NULL);
|
|
gettimeofday(&now, NULL);
|
|
resp->set("sent", Element::create(now.tv_sec +
|
|
resp->set("sent", Element::create(now.tv_sec +
|
|
- (double)now.tv_usec /
|
|
|
|
- 1000000));
|
|
|
|
|
|
+ (double)now.tv_usec / 1000000));
|
|
resp->set("counter", Element::create(counter));
|
|
resp->set("counter", Element::create(counter));
|
|
session_.group_sendmsg(resp, "statistics");
|
|
session_.group_sendmsg(resp, "statistics");
|
|
}
|
|
}
|