summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--listen/listen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/listen/listen.c b/listen/listen.c
index 29fa53f..7053412 100644
--- a/listen/listen.c
+++ b/listen/listen.c
@@ -52,9 +52,11 @@ static char * ts_format(unsigned int sec, unsigned int usec)
static char buf[sizeof("00:00:00.000000")];
unsigned int hours, minutes, seconds;
- hours = sec / 3600;
- minutes = (sec % 3600) / 60;
seconds = sec % 60;
+ sec = sec / 60;
+ minutes = sec % 60;
+ sec = sec / 60;
+ hours = sec % 24;
/*
* The real purpose of these checks is to let GCC figure out the