⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 time-it.c

📁 linux下用PCMCIA无线网卡虚拟无线AP的程序源码
💻 C
字号:
/* Reports run time, in seconds, for a command.   The command argument can have multiple words, but then   it has to be quoted, as for example      time-it "command < file1 > file2"   The time interval resolution is one whole second.  */#include <time.h>int system ();int printf ();intmain (argv, argc)     int argv;     char **argc;{  time_t t0, t1;  if (argv < 2)    {      printf ("Usage: time-it name_of_program_to_be_timed\n");      exit (1);    }  time (&t0);  /* Wait til the clock changes before starting.  */  do    {      time (&t1);    }  while (t1 == t0);  system (argc[1]);  t0 = t1;  time (&t1);  printf ("%ld seconds.\n", t1 - t0);  exit (0);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -