Current location

narf Source control manager Git

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Mehani <shtrom@ssji.net>2019-07-12 17:45:11 +1000
committerOlivier Mehani <shtrom@ssji.net>2019-07-12 17:45:11 +1000
commit36d97a354bedb8a83b0190e026bfd6e6c8ebc770 (patch)
tree0f8d9a6c3b2f85565495d29578c1afe32890592c
parent14b1cec4968d2e4fe75442d0a4af2889844334b9 (diff)
Fix print_delta
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
-rw-r--r--main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.c b/main.c
index 82a0c99..57d3d5f 100644
--- a/main.c
+++ b/main.c
@@ -74,9 +74,10 @@ int parse_argv(struct app_config *conf, int argc, char ** argv) {
void print_delta(struct timeb *start, struct timeb *stop) {
- fprintf(stderr, "delta: %lds %dms\n",
- stop->time - start->time,
- stop->millitm-start->millitm);
+ int startms, stopms;
+ startms = start->time*1000+start->millitm;
+ stopms = stop->time*1000+stop->millitm;
+ fprintf(stderr, "%dms\n", stopms - startms);
}