49 boost::uint64_t windowsTime() {
51 static const __int64 magic = 116444736000000000;
55 SystemTimeToFileTime(&st,&ft);
57 memcpy(&t,&ft,
sizeof t);
68 return windowsTime() / 10000;
73 gettimeofday(&tv, NULL);
76 return (((boost::uint64_t) tv.tv_sec) * 1000l) + (tv.tv_usec / 1000l);
86 return windowsTime() / 10;
91 gettimeofday(&tv, NULL);
94 return (((boost::uint64_t) tv.tv_sec) * 1000000ull) + (tv.tv_usec);
103 c = (char) (rand() % (
'z' -
'0' + 1) +
'0');
104 }
while (!std::isalnum(c));
std::string randAlnumStr(const std::string::size_type &length)
Generates a random alpha-numeric string with fixed length.
boost::uint64_t currentTimeMillis()
Returns the current system time as milliseconds.
char randAlnumChar()
Generates a random alpha-numeric character.
boost::uint64_t currentTimeMicros()
Returns the current system time as microseconds.
void operator()(void *ignored) const
Does nothing.