diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2007-01-30 15:32:31 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2007-01-30 15:32:31 +0000 |
commit | 7c88381a59771a3e0be35800af3496da1171e9a4 (patch) | |
tree | 06ec2e369b3fa856c249d0ea9983105eff489d37 /content/content.c | |
parent | f3e6ad3e9093bca4f8e053aa43ddf0631c9d4a18 (diff) | |
download | netsurf-7c88381a59771a3e0be35800af3496da1171e9a4.tar.gz netsurf-7c88381a59771a3e0be35800af3496da1171e9a4.tar.bz2 |
Make time taken that is displayed in status bar use gettimeofday()-based time rather than clock()-based time
svn path=/trunk/netsurf/; revision=3157
Diffstat (limited to 'content/content.c')
-rw-r--r-- | content/content.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/content.c b/content/content.c index f87084bce..d99d02b09 100644 --- a/content/content.c +++ b/content/content.c @@ -376,7 +376,7 @@ struct content * content_create(const char *url) c->refresh = 0; c->bitmap = 0; c->fresh = false; - c->time = clock(); + c->time = wallclock(); c->size = 0; c->title = 0; c->active = 0; @@ -614,7 +614,7 @@ void content_update_status(struct content *c) { char token[20]; const char *status; - clock_t time; + unsigned int time; snprintf(token, sizeof token, "HTTP%li", c->http_code); status = messages_get(token); @@ -624,13 +624,13 @@ void content_update_status(struct content *c) if (c->status == CONTENT_STATUS_TYPE_UNKNOWN || c->status == CONTENT_STATUS_LOADING || c->status == CONTENT_STATUS_READY) - time = clock() - c->time; + time = wallclock() - c->time; else time = c->time; snprintf(c->status_message, sizeof (c->status_message), "%s (%.1fs) %s", status, - (float) time / CLOCKS_PER_SEC, c->sub_status); + (float) time / 100, c->sub_status); /* LOG(("%s", c->status_message)); */ } @@ -752,7 +752,7 @@ void content_set_done(struct content *c) union content_msg_data msg_data; c->status = CONTENT_STATUS_DONE; - c->time = clock() - c->time; + c->time = wallclock() - c->time; content_update_status(c); content_broadcast(c, CONTENT_MSG_DONE, msg_data); } |