Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

Measuring time within an enclave

Sam_S_
Beginner
685 Views

Hi,

Is there a way of measuring execution time within an enclave?

I have tried the traditional methods such as

#include <sys/time.h>                // for gettimeofday()
struct timeval t1, t2;
gettimeofday(&t1, NULL);

OR 

#include <time.h>
clock_t start, end;
start = clock();

But none of them works. Is there any build in function that can be used within enclaves?

0 Kudos
2 Replies
Rodolfo_S_
New Contributor III
685 Views

Hi, Sam.

I believe this has been previously discussed here: https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/707273

0 Kudos
Sam_S_
Beginner
685 Views

Hi Rodolfo,

thanks for the link.

I saw that this is only available in simulation mode, is there any way perform a measurement also in hardware mode?

Thanks

0 Kudos
Reply