Try to add more useful information
This commit is contained in:
parent
1e86671fa4
commit
a5bf434b57
1 changed files with 8 additions and 5 deletions
|
@ -233,12 +233,15 @@ void evt_core_loop(struct evt_core_ctx* ctx) {
|
|||
fprintf(stderr, "Ignoring file descriptor %d as it is not registered. This is a bug.\n", events[n].data.fd);
|
||||
continue;
|
||||
}
|
||||
if (ctx->verbose) start = clock();
|
||||
if (ctx->verbose) {
|
||||
fprintf(stderr, "[BEGIN CB](name=%s, url=%s, fd=%d)\n", fdinfo->cat->name, fdinfo->url, fdinfo->fd);
|
||||
start = clock();
|
||||
}
|
||||
while(fdinfo->cat->cb(ctx, fdinfo) == 0);
|
||||
if (ctx->verbose) {
|
||||
end = clock();
|
||||
elapsed_in_cb = ((double) (end - start)) / CLOCKS_PER_SEC;
|
||||
fprintf(stderr, "%s cb took %f seconds to execute.\n", fdinfo->url, elapsed_in_cb);
|
||||
fprintf(stderr, "[END CB](time=%f sec)\n", elapsed_in_cb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue