Chris@87: /* timefuncs.h Chris@87: */ Chris@87: Chris@87: /* Utility function related to timemodule.c. */ Chris@87: Chris@87: #ifndef TIMEFUNCS_H Chris@87: #define TIMEFUNCS_H Chris@87: #ifdef __cplusplus Chris@87: extern "C" { Chris@87: #endif Chris@87: Chris@87: Chris@87: /* Cast double x to time_t, but raise ValueError if x is too large Chris@87: * to fit in a time_t. ValueError is set on return iff the return Chris@87: * value is (time_t)-1 and PyErr_Occurred(). Chris@87: */ Chris@87: PyAPI_FUNC(time_t) _PyTime_DoubleToTimet(double x); Chris@87: Chris@87: /* Get the current time since the epoch in seconds */ Chris@87: PyAPI_FUNC(double) _PyTime_FloatTime(void); Chris@87: Chris@87: Chris@87: #ifdef __cplusplus Chris@87: } Chris@87: #endif Chris@87: #endif /* TIMEFUNCS_H */