Skip to content

Instantly share code, notes, and snippets.

@fetus-hina
Created September 2, 2011 14:41
Show Gist options
  • Save fetus-hina/1188777 to your computer and use it in GitHub Desktop.
Save fetus-hina/1188777 to your computer and use it in GitHub Desktop.
UUID version 1 generate
#include <iostream>
#include <uuid/uuid.h>
int main(int, char *[]) {
uuid_t uuid;
uuid_generate_time(uuid);
char buffer[128 / 4 + 4 + 1] = {};
uuid_unparse(uuid, buffer);
std::cout << buffer << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment