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 0a227f3 commit ad36324Copy full SHA for ad36324
src/libcore/time.rs
@@ -512,7 +512,7 @@ impl Duration {
512
/// ```
513
#[stable(feature = "duration_float", since = "1.38.0")]
514
#[inline]
515
- pub const fn as_secs_f64(&self) -> f64 {
+ pub fn as_secs_f64(&self) -> f64 {
516
(self.secs as f64) + (self.nanos as f64) / (NANOS_PER_SEC as f64)
517
}
518
@@ -529,7 +529,7 @@ impl Duration {
529
530
531
532
- pub const fn as_secs_f32(&self) -> f32 {
+ pub fn as_secs_f32(&self) -> f32 {
533
(self.secs as f32) + (self.nanos as f32) / (NANOS_PER_SEC as f32)
534
535
0 commit comments