+ int print_usec = 0;
+ char* device = strdup("/dev/input/by-path/platform-i8042-serio-0-event-kbd");
+ struct option long_options[] = {
+ {"device", required_argument, 0, 'd' },
+ {"usec", no_argument, &print_usec, 1 },
+ {0, 0, 0, 0 },
+ };
+ while (1) {
+ int c = getopt_long(argc, argv, "", long_options, NULL);
+ if (c == -1) break;
+ if (c == 'd') {
+ free(device);
+ device = strdup(optarg);
+ continue;
+ }
+ if (c != 0) exit(EX_USAGE);
+ }
+
+ int fd = open(device, O_RDONLY);