Skip to content

Commit

Permalink
Modify time functions (#225)
Browse files Browse the repository at this point in the history
* set sleep function to empty due to no impact on crypto APIs

Signed-off-by: He, Jing J <jing.j.he@intel.com>
  • Loading branch information
jinghe-INTC authored Jun 25, 2024
1 parent 82727c4 commit 7146f23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Linux/package/include/sgx_tsgxssl.edl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ enclave {

untrusted {
void u_sgxssl_ftime([out, size=timeb_len] void * timeptr, uint32_t timeb_len);
void u_sgxssl_usleep(int micro_seconds);
//void u_sgxssl_usleep(int micro_seconds);
};

};
6 changes: 4 additions & 2 deletions Linux/sgx/libsgx_tsgxssl/ttime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ int sgxssl_clock_gettime(int clk_id, struct timespec *tp)

void sgxssl_usleep(int micro_seconds)
{
u_sgxssl_usleep(micro_seconds);
(void)(micro_seconds);
return;
}
void sgxssl_sleep(int seconds)
{
u_sgxssl_usleep(1000000 * seconds);
(void)(seconds);
return;
}
}

0 comments on commit 7146f23

Please sign in to comment.