// Log action
DEBUG(self->ctx, "Rendered graph %s in %.2fms:\n", td_graph_get_name(self),
- USEC_TO_MSEC((double)(t_end - t_start / CLOCKS_PER_SEC)));
+ SEC_TO_MSEC((double)(t_end - t_start) / CLOCKS_PER_SEC));
DEBUG(self->ctx, " size : %d byte(s)\n", ftell(f));
DEBUG(self->ctx, " width : %d\n", w);
DEBUG(self->ctx, " height : %d\n", h);
#include <time.h>
// Seconds to milliseconds
-#define SEC_TO_MSEC(s) ((s) * 1000UL)
+#define SEC_TO_MSEC(s) ((s) * 1000.0)
// Seconds to microseconds
#define SEC_TO_USEC(s) ((s) * 1000000UL)