how to measure pipe syscall time in milliseconds?
问题 I want to see the time of my pipe program system call. I need to measure it for analyzing results. How can i measure the time of system call in milliseconds? For example, this is simple pipe program: #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <sys/timeb.h> #include <time.h> void main() { FILE *read_fp; char buffer[10]; int cnt; memset(buffer,'\0',sizeof(buffer)); read_fp=popen("uname -a","|"); if (read_fp!=NULL) { cnt=fread(buffer,sizeof(char),9