summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-31 21:37:06 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-01-31 21:37:06 +0100
commitef1f5954e6fb0f534e9cbb2b5c51072896abab52 (patch)
tree9e0ed28a10cbe27e69ddb25eca62ad06e4b43054 /src
parent1825e27d0f9627faeb6ad59c50d6c64c7d3003f3 (diff)
downloadadvtime-ef1f5954e6fb0f534e9cbb2b5c51072896abab52.tar.gz
advtime-ef1f5954e6fb0f534e9cbb2b5c51072896abab52.tar.bz2
advtime-ef1f5954e6fb0f534e9cbb2b5c51072896abab52.zip
Put print_time into util.c
Diffstat (limited to 'src')
-rw-r--r--src/advtime.c14
-rw-r--r--src/util.c14
-rw-r--r--src/util.h5
3 files changed, 19 insertions, 14 deletions
diff --git a/src/advtime.c b/src/advtime.c
index b68b73a..1b0fa3d 100644
--- a/src/advtime.c
+++ b/src/advtime.c
@@ -17,20 +17,6 @@ pswap(void **p1, void **p2)
*p2 = tmp;
}
-/* print time in format: "hh:mm:ss.xxx" */
-static void
-print_time(int64_t msec) {
-
- int hh = msec / 1000 / 60 / 60;
- msec -= hh * 1000 * 60 * 60;
- int mm = msec / 1000 / 60;
- msec -= mm * 1000 * 60;
- int ss = msec / 1000;
- msec -= ss * 1000;
-
- printf("%02d:%02d:%02d.%03jd", hh, mm, ss, msec);
-}
-
static void
start_new_szene(int64_t prev_szene_end, int64_t start)
{
diff --git a/src/util.c b/src/util.c
index d9c8f35..8b73466 100644
--- a/src/util.c
+++ b/src/util.c
@@ -39,3 +39,17 @@ frame_mix(struct video_frame *frame_a, struct video_frame *frame_b)
row_b += frame_b->stride;
}
}
+
+/* print time in format: "hh:mm:ss.xxx" */
+void
+print_time(int64_t msec) {
+
+ int hh = msec / 1000 / 60 / 60;
+ msec -= hh * 1000 * 60 * 60;
+ int mm = msec / 1000 / 60;
+ msec -= mm * 1000 * 60;
+ int ss = msec / 1000;
+ msec -= ss * 1000;
+
+ printf("%02d:%02d:%02d.%03jd", hh, mm, ss, msec);
+}
diff --git a/src/util.h b/src/util.h
index bcc2828..649e9ee 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,6 +1,8 @@
#ifndef _UTIL_H_
#define _UTIL_H_
+#include <stdint.h>
+
int
pgm_save(unsigned char *buf, int wrap, int xsize, int ysize, char *filename);
@@ -8,4 +10,7 @@ pgm_save(unsigned char *buf, int wrap, int xsize, int ysize, char *filename);
void
frame_mix(struct video_frame *frame_a, struct video_frame *frame_b);
+void
+print_time(int64_t msec);
+
#endif /* _UTIL_H_ */