summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/pytime.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/Include/pytime.h b/Include/pytime.h
index 0ff009a..919ba30 100644
--- a/Include/pytime.h
+++ b/Include/pytime.h
@@ -13,15 +13,6 @@ functions and constants
extern "C" {
#endif
-#ifdef HAVE_GETTIMEOFDAY
-typedef struct timeval _PyTime_timeval;
-#else
-typedef struct {
- time_t tv_sec; /* seconds since Jan. 1, 1970 */
- long tv_usec; /* and microseconds */
-} _PyTime_timeval;
-#endif
-
/* Structure used by time.get_clock_info() */
typedef struct {
const char *implementation;
@@ -30,11 +21,6 @@ typedef struct {
double resolution;
} _Py_clock_info_t;
-/* Similar to POSIX gettimeofday but cannot fail. If system gettimeofday
- * fails or is not available, fall back to lower resolution clocks.
- */
-PyAPI_FUNC(void) _PyTime_gettimeofday(_PyTime_timeval *tp);
-
typedef enum {
/* Round towards zero. */
_PyTime_ROUND_DOWN=0,
@@ -134,6 +120,12 @@ PyAPI_FUNC(int) _PyTime_AsTimespec(_PyTime_t t, struct timespec *ts);
#endif
/* Get the current time from the system clock.
+
+ The function cannot fail. _PyTime_Init() ensures that the system clock
+ works. */
+PyAPI_FUNC(_PyTime_t) _PyTime_GetSystemClock(void);
+
+/* Get the current time from the system clock.
* Fill clock information if info is not NULL.
* Raise an exception and return -1 on error, return 0 on success.
*/