Make the hardclock test optional

Known to fail on VMs (such as the buildbots), see eg
http://blog.badtrace.com/post/rdtsc-x86-instruction-to-detect-vms/
This commit is contained in:
Manuel Pégourié-Gonnard 2015-07-01 19:19:49 +02:00
parent 9bd0afdb22
commit 5791109707
2 changed files with 52 additions and 46 deletions

View file

@ -62,6 +62,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.
*/
unsigned long mbedtls_timing_hardclock( void );