34 static bool initialized =
false;
38 ::gettimeofday(&time, NULL);
41 srand(static_cast<unsigned int>((time.tv_sec * 100) + (time.tv_usec / 100)));
52 static const char text[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
53 std::vector<char> dst(size);
57 dst[i] = text[rand() % (
sizeof text - 1)];
59 return std::string(dst.begin(), dst.end());