Move part of timing module out of the library
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h
index 16f8f8b..1626efb 100644
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
@@ -268,7 +268,7 @@
/**
* \def MBEDTLS_TIMING_ALT
*
- * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(),
+ * Uncomment to provide your own alternate implementation for
* mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
*
* Only works if you have MBEDTLS_TIMING_C enabled.
@@ -1015,7 +1015,7 @@
* \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
*
* Do not add default entropy sources. These are the platform specific
- * or mbedtls_timing_hardclock poll function.
+ * poll function.
*
* This is useful to have more control over the added entropy sources in an
* application.
diff --git a/include/mbedtls/timing.h b/include/mbedtls/timing.h
index 7669bb9..9ea5c29 100644
--- a/include/mbedtls/timing.h
+++ b/include/mbedtls/timing.h
@@ -64,20 +64,10 @@
extern volatile int mbedtls_timing_alarmed;
/**
- * \brief Return the CPU cycle counter value
- *
- * \warning This is only a best effort! Do not rely on this!
- * In particular, it is known to be unreliable on virtual
- * machines.
- *
- * \note This value starts at an unspecified origin and
- * may wrap around.
- */
-unsigned long mbedtls_timing_hardclock( void );
-
-/**
* \brief Return the elapsed time in milliseconds
*
+ * \warning May change without notice
+ *
* \param val points to a timer structure
* \param reset If 0, query the elapsed time. Otherwise (re)start the timer.
*
@@ -95,18 +85,6 @@
unsigned long mbedtls_timing_get_timer( struct mbedtls_timing_hr_time *val, int reset );
/**
- * \brief Setup an alarm clock
- *
- * \param seconds delay before the "mbedtls_timing_alarmed" flag is set
- * (must be >=0)
- *
- * \warning Only one alarm at a time is supported. In a threaded
- * context, this means one for the whole process, not one per
- * thread.
- */
-void mbedtls_set_alarm( int seconds );
-
-/**
* \brief Set a pair of delays to watch
* (See \c mbedtls_timing_get_delay().)
*
@@ -136,15 +114,6 @@
*/
int mbedtls_timing_get_delay( void *data );
-#if defined(MBEDTLS_SELF_TEST)
-/**
- * \brief Checkup routine
- *
- * \return 0 if successful, or 1 if a test failed
- */
-int mbedtls_timing_self_test( int verbose );
-#endif
-
#ifdef __cplusplus
}
#endif