1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#include<stdio.h> #include<Windows.h> #include<process.h>
void () { extern int x; printf("%dn", x);
} int x = 10;
void time(void *p) { int i = 0; while (1) { char str[100] = { 0 }; sprintf(str, "title 当前第%d秒", i); system(str); i++; Sleep(1000);
} } void time2() { time_t start, end; time(&start); Sleep(4000); time(&end); printf("%d", (unsigned)(end - start)); getchar(); } void h() { printf("%d", 1); } void main() { _beginthread(time, 0, NULL); getchar(); }
|
近期评论