Is it possible to execute a sleep() inside an enclave.
Thanks in advance
Os calls(sleep()) cannot be used directly inside the enclave. We can use an OCALL to execute them.
View solution in original post
Thank you Anusha :)
OCALL may not safe since the sleep action will be performed by untrusted part, so I implemented sleep by using "sgx_get_trusted_time"
I think If you really need this, just make an OCALL. But in this way the time sleep()ed may not be accurate.
For more complete information about compiler optimizations, see our Optimization Notice.