* forgot something
This commit is contained in:
parent
722ff4d7db
commit
53e88fca44
@ -82,6 +82,15 @@ std::string getDateString(void)
|
||||
return std::string(str);
|
||||
}
|
||||
|
||||
std::string GetTimeString(void)
|
||||
{
|
||||
time_t t = time(NULL);
|
||||
tm* aTm = localtime(&t);
|
||||
char str[15];
|
||||
sprintf(str,"%02d:%02d:%02d", aTm->tm_hour,aTm->tm_min,aTm->tm_sec);
|
||||
return std::string(str);
|
||||
}
|
||||
|
||||
uint64 toInt(std::string str)
|
||||
{
|
||||
if(str.empty())
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
#ifndef _TOOLS_H
|
||||
#define _TOOLS_H
|
||||
|
||||
@ -14,6 +15,7 @@ std::string stringToUpper(std::string);
|
||||
std::string stringToLower(std::string);
|
||||
std::string toString(uint64);
|
||||
std::string getDateString(void);
|
||||
std::string GetTimeString(void);
|
||||
uint64 toInt(std::string);
|
||||
std::string toHexDump(uint8* array,uint32 size,bool spaces=true,uint32 per_line=0);
|
||||
std::deque<std::string> GetFileList(std::string);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user