I am trying to load time.h directly with Cython instead of Python's import time
but it doesn't work.
All I get is an error
Call with wrong number of arguments (expected 1, got 0)
with the following code
cdef extern from "time.h" nogil:
ctypedef int time_t
time_t time(time_t*)
def test():
cdef int ts
ts = time()
return ts
and
Cannot assign type 'long' to 'time_t *'
with the following code
cdef extern from "time.h" nogil:
ctypedef int time_t
time_t time(time_t*)
def test():
cdef int ts
ts = time(1)
return ts
with math log I can simply do
cdef extern from "math.h":
double log10(double x)
How comes it is not possible with time?