Skip to content

Commit

Permalink
types: fix missing trait
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
  • Loading branch information
bluele committed Jun 7, 2023
1 parent beb110e commit 248f679
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/types/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ impl Time {
#[cfg(feature = "sgx")]
pub fn now() -> Self {
use sgx_tstd::time::{SystemTime, UNIX_EPOCH};
use sgx_tstd::untrusted::time::SystemTimeEx;
let now = SystemTime::now().duration_since(UNIX_EPOCH).unwrap();
Time(TmTime::from_unix_timestamp(now.as_secs() as i64, now.subsec_nanos()).unwrap())
}
Expand Down

0 comments on commit 248f679

Please sign in to comment.