[CODE]#include <time.h>
#include <stdio.h>
#ifndef CLOCKS_PER_SEC
#define CLOCKS_PER_SEC 18
#endif
void my_delay(unsigned long ms);
int main(void)
{
int i;
for(i=0;i<10;i++)
{
my_delay(1000);
printf("nihao ");
}
printf("\n") ;
return 0;
}
void my_delay(unsigned long ms)
{
double start_time = (double)clock() / CLOCKS_PER_SEC * 1000;
while ( (double)clock() / CLOCKS_PER_SEC * 1000 - start_time < ms ) ;
}[/CODE]
稍微改了一下..你去测试一下吧
[glow=255,violet,2]闭关修炼ing...[/glow] [FLASH=360,180]http://www./chinaren.swf[/FLASH]