I am writing C++ code to determine the elapsed time it takes for an operation inside the enclave.
For this purpose I am using std::clock() , to determine the CPU time. I am starting the timer in the untrusted layer. Once the enclave operations are complete and the control comes back to the untrusted layer, I am calculating the elapsed time.
- Is my method of determining elapsed time correct?
- When I do an enclave call, doesnt the CPU go into context switch ? And if it does does it treat the enclave also to be the same process? FYI:: My program is a single threaded process.