10 while(1) printf("c: %d, cps %d\n", clock(), CLOCKS_PER_SEC
);
12 char passwd
[PWSIZE
], loginpasswd
[PWSIZE
];
13 long timestamp
[PWSIZE
], logintimestamp
;
14 int i
, sensitivity
= 200;
20 printf("Enter new pwd: ");
21 for(i
=0;i
<(PWSIZE
-1);i
++) {
23 passwd
[i
] = getchar();
24 if(passwd
[i
] == '\n') {
30 timestamp
[i
] += clock()/CLOCKS_PER_SEC
;
36 printf("Enter login pwd: ");
37 for(i
=0;i
<(PWSIZE
-1);i
++) {
39 if(getchar() != passwd
[i
]) {
40 printf("\nIncorrect!\n");
44 logintimestamp
+= clock()/CLOCKS_PER_SEC
;
45 logintimestamp
-= timestamp
[i
];
46 if(sqrt(logintimestamp
*logintimestamp
) > sensitivity
) {
47 printf("\nIncorrect timing!\n");
This page took 0.895061 seconds and 4 git commands to generate.