()
| 635 | } |
| 636 | |
| 637 | fn settable_clock() -> (Arc<Mutex<DateTime<Utc>>>, InMemorySandboxGrants) { |
| 638 | let now = Arc::new(Mutex::new(Utc::now())); |
| 639 | let read = Arc::clone(&now); |
| 640 | let grants = InMemorySandboxGrants::with_clock(Arc::new(move || *read.lock().unwrap())); |
| 641 | (now, grants) |
| 642 | } |
| 643 | |
| 644 | #[test] |
| 645 | fn a_token_reaches_its_view_until_it_ends() { |