summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Kendrick (monotony) <rjek@rjek.com>2012-10-11 18:59:16 (GMT)
committer Rob Kendrick (monotony) <rjek@rjek.com>2012-10-11 18:59:16 (GMT)
commit9445ddff205f082942129a0273a041f9359f8bd6 (patch)
tree5e64c529acb5930a3e4bce5892f04620b0b5cf2d
parent327fd74cc7343007ff3cad85f76da8cbefe180e8 (diff)
downloadsqueeze-9445ddff205f082942129a0273a041f9359f8bd6.tar.gz
squeeze-9445ddff205f082942129a0273a041f9359f8bd6.tar.bz2
clock() does not return centiseconds in the real world.
-rw-r--r--squeeze.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/squeeze.c b/squeeze.c
index ea0122c..e911cef 100644
--- a/squeeze.c
+++ b/squeeze.c
@@ -161,7 +161,10 @@ int wf_save(char *filename, void *ptr, int len)
static int ticks(void)
{ int last;
- last = lastticks; lastticks = clock(); return(lastticks-last);
+ last = lastticks;
+ lastticks = (clock() * 100) / CLOCKS_PER_SEC;
+
+ return(lastticks-last);
}
static int fileinfo(_kernel_osfile_block *info, const char *name)
@@ -888,7 +891,7 @@ static int squeeze(char *in, char *out)
else top = compress(code, size, info.exec - info.load);
if (top != NULL) {
- t = clock() - t;
+ t = ((clock() * 100) / CLOCKS_PER_SEC) - t;
if (isdata) {
d->bl_decompress = code[0] + DATAWORDS; /* dirty... */
code -= DATAWORDS;