Commit ba1f9066 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

Remove clock related code

parent e373ac74
...@@ -9,8 +9,6 @@ cdef extern from "<unistd.h>" nogil: ...@@ -9,8 +9,6 @@ cdef extern from "<unistd.h>" nogil:
from libcpp.deque cimport deque from libcpp.deque cimport deque
ctypedef deque[coro_t *] coro_deque_t ctypedef deque[coro_t *] coro_deque_t
from libc.time cimport CLOCKS_PER_SEC, clock_t, clock
cdef extern from "lwan/lwan-coro.h" nogil: cdef extern from "lwan/lwan-coro.h" nogil:
ctypedef struct coro_switcher_t: ctypedef struct coro_switcher_t:
pass pass
...@@ -237,12 +235,9 @@ cdef void worker_destroy(worker_t *worker) nogil: ...@@ -237,12 +235,9 @@ cdef void worker_destroy(worker_t *worker) nogil:
def main(): def main():
cdef: cdef:
scheduler_t s scheduler_t s
clock_t begin, end
unsigned int i unsigned int i
with nogil: with nogil:
begin = clock()
scheduler_init(&s) scheduler_init(&s)
for i in range(500): for i in range(500):
...@@ -251,9 +246,6 @@ def main(): ...@@ -251,9 +246,6 @@ def main():
scheduler_run(&s) scheduler_run(&s)
scheduler_destroy(&s) scheduler_destroy(&s)
end = clock()
printf("%f\n", <double>(end - begin) / CLOCKS_PER_SEC)
# Example task # Example task
cdef int task(coro_t *coroutine, void *arg) nogil: cdef int task(coro_t *coroutine, void *arg) nogil:
cdef int a = 5 cdef int a = 5
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment