Greg Ward avatar Greg Ward committed 7af83bf

Clarify timeout-related help and output a smidge.
Also rename msalarm() to set_alarm(), because that's what it does.

Comments (0)

Files changed (1)

                 break;
             case 'h':
             default:
-                printf("usage: %s [-h] [-d] [-t ms_timeout] [-f FORMAT]\n", argv[0]);
+                printf("usage: %s [-h] [-d] [-t timeout_ms] [-f FORMAT]\n", argv[0]);
                 printf("FORMAT (default=\"%s\") may contain:\n%s",
                 DEFAULT_FORMAT,
                 " %b  show branch\n"
 void
 exit_on_alarm(int sig)
 {
-    printf("[unknown:timeout]");
+    printf("[timeout]");
     exit(1);
 }
 
 unsigned int
-msalarm(unsigned int milliseconds)
+set_alarm(unsigned int milliseconds)
 {
     struct itimerval old, new;
     new.it_interval.tv_usec = 0;
 
     if (options.timeout) {
         debug("will timeout after %d ms", options.timeout);
-        msalarm(options.timeout);
+        set_alarm(options.timeout);
     } else {
         debug("will never timeout");
     }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.