aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rq.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/rq.c b/src/rq.c
index cf05bd5..7ea61a6 100644
--- a/src/rq.c
+++ b/src/rq.c
@@ -211,6 +211,7 @@ static int display_file(int fd, int ttyfd, long rate)
size_t size = 0;
void *new;
int saved_errno;
+ int timer_set = 1;
char *s;
char *end;
char c;
@@ -263,13 +264,17 @@ static int display_file(int fd, int ttyfd, long rate)
SET_RATE;
goto rewait;
case 'p': /* P */
- ;/* TODO pause*/
- break;
+ if (timer_set)
+ memset(&interval, 0, sizeof(interval));
+ else
+ SET_RATE;
+ setitimer(ITIMER_REAL, &interval, NULL);
+ timer_set ^= 1;
+ goto rewait;
case 'q': /* Q */
goto done;
case 'B': /* down */
case 'C': /* right */
- ;/* TODO next */
break;
case 'A': /* up */
case 'D': /* left */