2 * On-screen Display Daemon -- Utility Functions
4 * (c) 2010 Martin Mares <mj@ucw.cz>
14 void __attribute__((noreturn)) __attribute__((format(printf,1,2)))
19 fputs("osdd: ", stderr);
20 vfprintf(stderr, fmt, args);
28 void *p = malloc(size);
30 die("Failed to allocate %d bytes of memory", size);
35 get_current_time(void)
38 gettimeofday(&tv, NULL);
39 return (timestamp_t) tv.tv_sec * 1000 + tv.tv_usec / 1000;