summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2022-11-27 12:41:47 +0100
committermzuenni <michi.zuendorf@gmail.com>2022-11-27 12:42:12 +0100
commit40f598b33ac8b60774bed5c12fb89fe4e5d586c1 (patch)
tree82cdaa96a65c86ec60ae94d1edac4995e656783b
parent61cf49dc40127e1ecde48d4cc2f8110b7b210eb9 (diff)
fixed timed code
-rw-r--r--other/timed.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/other/timed.cpp b/other/timed.cpp
index 20eec70..b3ed4ef 100644
--- a/other/timed.cpp
+++ b/other/timed.cpp
@@ -1,3 +1,3 @@
int times = clock();
//run for 900ms
-while (clock()-times < 900) {...}
+while (1000*(clock()-times)/CLOCKS_PER_SEC < 900) {...}