According to the Intel SGX Developer Reference for Windows*: "The Enclave retrieves the time reference and the time source nonce using sgx_get_trusted_time. " To guarantee that the time source does not change between two readings of sgx_get_trusted_time, compare the nonce from each reading. They should be the same.
Intel SGX Platform Services details how the Intel SGX SDK for Windows accesses hardware-based monotonic counters implemented in the Intel® Converged Security and Management Engine (Intel® CSME), which is only available in client systems.
Refer to the section on the Sealed Data example in the Intel SGX Developer Reference for Windows for more details on how to protect against replay attacks.