File tree Expand file tree Collapse file tree 1 file changed +1
-29
lines changed
Expand file tree Collapse file tree 1 file changed +1
-29
lines changed Original file line number Diff line number Diff line change 11use std:: future:: Future ;
2- use std:: time:: { Duration , Instant } ;
2+ use std:: time:: Instant ;
33
44use futures_util:: FutureExt ;
55use xtra:: prelude:: * ;
@@ -42,34 +42,6 @@ impl Handler<GetCount> for Counter {
4242 }
4343}
4444
45- #[ derive( xtra:: Actor ) ]
46- struct SendTimer {
47- time : Duration ,
48- }
49-
50- struct GetTime ;
51-
52- impl Handler < GetTime > for SendTimer {
53- type Return = Duration ;
54-
55- async fn handle ( & mut self , _time : GetTime , _ctx : & mut Context < Self > ) -> Duration {
56- self . time
57- }
58- }
59-
60- #[ derive( xtra:: Actor ) ]
61- struct ReturnTimer ;
62-
63- struct TimeReturn ;
64-
65- impl Handler < TimeReturn > for ReturnTimer {
66- type Return = Instant ;
67-
68- async fn handle ( & mut self , _time : TimeReturn , _ctx : & mut Context < Self > ) -> Instant {
69- Instant :: now ( )
70- }
71- }
72-
7345const COUNT : usize = 10_000_000 ; // May take a while on some machines
7446
7547async fn do_address_benchmark < R > (
You can’t perform that action at this time.
0 commit comments