add makeint64 high32 low32 function
This commit is contained in:
parent
e62be6c99f
commit
ce7b882956
@ -163,4 +163,20 @@ namespace a8
|
|||||||
strftime(buff, a8::ArraySize(buff), "%F %T", &tm_time);
|
strftime(buff, a8::ArraySize(buff), "%F %T", &tm_time);
|
||||||
return std::string(buff);
|
return std::string(buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long long MakeInt64(int low32, int high32)
|
||||||
|
{
|
||||||
|
return low32 + ((long long)high32 >> 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
int Low32(long long int64_val)
|
||||||
|
{
|
||||||
|
return (int)int64_val;
|
||||||
|
}
|
||||||
|
|
||||||
|
int High32(long long int64_val)
|
||||||
|
{
|
||||||
|
return (int)(int64_val << 32);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,10 @@ namespace a8
|
|||||||
std::string GetIpAddress(unsigned long ip_saddr);
|
std::string GetIpAddress(unsigned long ip_saddr);
|
||||||
std::string FormatDateTime(time_t time_val);
|
std::string FormatDateTime(time_t time_val);
|
||||||
|
|
||||||
|
long long MakeInt64(int low32, int high32);
|
||||||
|
int Low32(long long int64_val);
|
||||||
|
int High32(long long int64_val);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user