We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21310f9 commit 1d25143Copy full SHA for 1d25143
src/time.rs
@@ -102,12 +102,12 @@ impl MonoTimer {
102
}
103
104
/// Returns the frequency at which the monotonic timer is operating at
105
- pub fn frequency(&self) -> Hertz {
+ pub fn frequency(self) -> Hertz {
106
self.frequency
107
108
109
/// Returns an `Instant` corresponding to "now"
110
- pub fn now(&self) -> Instant {
+ pub fn now(self) -> Instant {
111
Instant {
112
now: DWT::get_cycle_count(),
113
@@ -122,7 +122,7 @@ pub struct Instant {
122
123
impl Instant {
124
/// Ticks elapsed since the `Instant` was created
125
- pub fn elapsed(&self) -> u32 {
+ pub fn elapsed(self) -> u32 {
126
DWT::get_cycle_count().wrapping_sub(self.now)
127
128
0 commit comments