maitake Clock
could be a trait if the global clock was double-indirected
#488
Labels
Clock
could be a trait if the global clock was double-indirected
#488
originally, i wanted
Clock
to be a trait rather than a struct, but that fell apart because i really wanted the global timer to live in a singleAtomicPtr
, so it couldn't be generic. but, whilst talking to @iximeow about Totally Unrelated Subjects, it occurred to me that if the timer just held onto a&'static dyn Clock
, and the global timer was anAtomicPtr<Timer>
, you could have a trait based clock. the downside is just that now the clock is double indirected from the timer, which is kinda sad.The text was updated successfully, but these errors were encountered: