$BKRLn$H?=$7$^$9!#(B
Post by YuichiroTATEIWALinux$B$N%"%W%j%1!<%7%g%s$N5/F0;~4V$r7WB,$9$kJ}K!$K$D$$$F%"%I%P%$%9$r$$(B
$B$?$H$($P!$(BFirefox$B$N5/F0;~4V!J%3%^%s%I3NDj8e!A%&%#%s%I%&=P8=!K$r7WB,$9(B
$B$kJ}K!$O$I$N$h$&$J$b$N$,$"$k$N$G$7$g$&$+!)(B
Web browser$***@lMQ$G$9$,9M$($F8+$^$7$?!#(B
$B$^$:!"(Bdate$B%3%^%s%I$h$j:Y$+$$;~9o$rI=<($G$-$k!"(B
microtime$B%3%^%s%I$r$D$/$j(B/usr/local/bin$B$K(Binstall$B$7$^$9!#(B
$B$?$H$($P$3$s$J46$8$G$9!#(B
/* $Id: microtime.c,v 1.1 2006-03-18 05:50:22 mac Exp $ */
/* Microsec Time
* Copyleft 2006 Shigeru Makino <***@line.to>
*/
#include <stdio.h>
#include <sys/time.h>
int
main(void)
{
struct timeval tv;
struct timezone tz;
double time;
tz.tz_minuteswest = 0;
tz.tz_dsttime = 0;
gettimeofday(&tv, &tz);
time = tv.tv_sec + tv.tv_usec / 1e6;
printf ("micro time %lf\n", time);
return 0;
}
$B<!$K(Bmicrotime$B$rI=<($9$k(BCGI$B$rMQ0U$7!"(Blocalhost$B$NE,Ev$J>l=j$KCV$-!"(B
$B%V%i%&%6$r5/F0$7$?$H$-$3$N%Z!<%8$,:G=i$K<+F0E*$KI=<($5$l$k$h$&!"(B
$B%;%C%H%"%C%W$7$^$9!#(B
CGI$B$O$J$s$G=q$$$F$b$+$^$$$^$;$s$,!"(BC$B$G=q$1$P$3$s$J46$8$G$9!#(B
$B%3%s%Q%$%k$7%*%V%8%'%/%H$r(Bndex.cgi$B$7$^$9!#(B
http://line.to/mac/linux/microtime/index.cgi
$B$K$*$$$F$_$^$7$?!#(B
/* $Id: index.c,v 1.2 2006-03-18 06:11:15 mac Exp $ */
/* Micro Time Display CGI
* Copyleft 2006 Shigeru Makino <***@line.to>
*/
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
printf("Content-type: text/html\n\n");
printf("<html>\n");
printf("<head>\n");
printf("<meta http-equiv=\"Content-Type\"
content=\"text/html;charset=iso-2022-jp\">\n");
printf("<title>Micro Time</title>\n");
printf("</head>\n");
printf("<body link=\"#0000ff\" vlink=\"#800080\">\n");
printf("<hr>\n");
printf("<h1>Micro Time</h1>\n");
printf("<hr>\n");
fflush(stdout);
system("/usr/local/bin/microtime");
printf("</body>\n");
printf("</html>\n");
return 0;
}
$B$"$H$O!"%3%s%=!<%k$+$i!"(B
% microtime; mozilla
$B$HF~NO$7!"%3%s%=!<%k$KI=<($5$l$?;~9o$H!"(B
$B%V%i%&%6$KI=<($5$l$?;~9o$N:9$r5a$a$l$P!"(B
$BL\E*$,C#@.$5$l$k$H;W$$$^$9!#(B
-- mac