Measuring run time is a significant aspect of perfromance evaluation. Now I want to evaluate the performance of several codes inside the SGX enclave (the trusted execution environment), and I noticed the Intel SGX provides an API called 'sgx_get_trusted_time()' for developers to obtain current time from a trusted source. However, I got trouble here:
1) The 'sgx_create_pse_session()' is required before using 'sgx_get_trusted_time()', but I always got an error 'SGX_ERROR_SERVICE_UNAVAILABLE'.I have installed and configured the SGX SDK and PSW correctly (otherwise I cannot use the Remote Attestation Service). I also tried to update Management Engine for the development platform (Win10 + ThinkPad x270 + CORE i5), but it didn' work;
2) The API returns the time in seconds, which is far from precise in terms of performance evaluation, especially when the time passed between two API calls is trival.
How can I fix the first problem, and any solution to measure the time passed insided the enclave more precisely? Appreciate for any suggestion or hint.