diff options
author | Rob Kendrick (monotony) <rjek@rjek.com> | 2012-10-11 19:59:16 +0100 |
---|---|---|
committer | Rob Kendrick (monotony) <rjek@rjek.com> | 2012-10-11 19:59:16 +0100 |
commit | 9445ddff205f082942129a0273a041f9359f8bd6 (patch) | |
tree | 5e64c529acb5930a3e4bce5892f04620b0b5cf2d | |
parent | 327fd74cc7343007ff3cad85f76da8cbefe180e8 (diff) | |
download | squeeze-9445ddff205f082942129a0273a041f9359f8bd6.tar.gz squeeze-9445ddff205f082942129a0273a041f9359f8bd6.tar.bz2 |
clock() does not return centiseconds in the real world.
-rw-r--r-- | squeeze.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |