7 void notifyf(void*, char*);
10 main(int argc, char *argv[])
19 fprint(2, "usage: time command\n");
27 exec(argv[1], &argv[1]);
28 if(argv[1][0] != '/' && strncmp(argv[1], "./", 2) &&
29 strncmp(argv[1], "../", 3)){
30 sprint(output, "/bin/%s", argv[1]);
31 exec(output, &argv[1]);
41 errstr(err, sizeof err);
42 if(strcmp(err, "interrupted") == 0)
47 add("%ld.%.2ldu", l/1000, (l%1000)/10);
49 add("%ld.%.2lds", l/1000, (l%1000)/10);
51 add("%ld.%.2ldr", l/1000, (l%1000)/10);
53 for(i=1; i<argc; i++){
54 add("%s", argv[i], 0);
61 p = utfrune(w->msg, ':');
66 add(" # status=%s", p);
68 fprint(2, "%s\n", output);
81 vseprint(output+strlen(output), output+sizeof(output), a, arg);
90 fprint(2, "time: %s: %r\n", s);
95 notifyf(void *a, char *s)
98 if(strcmp(s, "interrupt") == 0)