PICout optimization

This commit is contained in:
Andrey
2022-04-13 17:59:24 +03:00
parent 5ed900c46c
commit 2ab2614ab4
6 changed files with 149 additions and 37 deletions

View File

@@ -31,6 +31,7 @@
#ifdef ESP_PLATFORM
# include "esp_system.h"
#endif
#include <codecvt>
#ifdef WINDOWS
# include <winsock2.h>
extern FILETIME __pi_ftjan1970;
@@ -208,8 +209,12 @@ PIInit::PIInit() {
#endif
char cbuff[1024];
memset(cbuff, 0, 1024);
if (gethostname(cbuff, 1023) == 0)
if (gethostname(cbuff, 1023) == 0) {
sinfo->hostname = cbuff;
}
// std::ios_base::sync_with_stdio(false);
// std::locale utf8( std::locale(), new std::codecvt_utf8<wchar_t> );
// std::wcout.imbue(utf8);
#ifdef WINDOWS
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);