Update & BugFix Add GatewayTester

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-08-28 20:44:40 +09:00
parent bb1455f528
commit 5019ead91d
59 changed files with 5392 additions and 231 deletions

View File

@@ -31,14 +31,14 @@ using namespace MQTTSNGW;
=====================================*/
char theCurrentTime[32];
char* currentDateTime()
const char* currentDateTime()
{
struct timeval now;
struct tm tstruct;
gettimeofday(&now, 0);
tstruct = *localtime(&now.tv_sec);
strftime(theCurrentTime, sizeof(theCurrentTime), "%Y%m%d %H%M%S", &tstruct);
sprintf(theCurrentTime + 15, " %03d", (int)now.tv_usec / 1000 );
sprintf(theCurrentTime + 15, ".%03d", (int)now.tv_usec / 1000 );
return theCurrentTime;
}