mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-18 09:56:50 +01:00
Update & BugFix Add GatewayTester
Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user