Skip to content

Commit

Permalink
Remove todo; future work
Browse files Browse the repository at this point in the history
  • Loading branch information
ramon-bernardo committed Oct 17, 2024
1 parent b1f9739 commit b68c00d
Showing 1 changed file with 0 additions and 92 deletions.
92 changes: 0 additions & 92 deletions crates/rune-modules/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,98 +53,6 @@ pub fn module(_stdio: bool) -> Result<Module, ContextError> {
module.function_meta(Duration::as_secs_f64__meta)?;
module.function_meta(Duration::from_secs_f64__meta)?;

/* TODO: Make Duration a ConstValue
module
.constant("SECOND", Duration::from_secs(1))
.build_associated::<Duration>()?
.docs(docstring! {
/// The duration of one second.
///
/// # Examples
///
/// ```rune,no_run
/// use time::Duration;
///
/// let duration = Duration::SECOND;
/// ```
})?;
module
.constant("MILLISECOND", Duration::from_millis(1))
.build_associated::<Duration>()?
.docs(docstring! {
/// The duration of one millisecond.
///
/// # Examples
///
/// ```rune,no_run
/// use time::Duration;
///
/// let duration = Duration::MILLISECOND;
/// ```
})?;
module
.constant("MICROSECOND", Duration::from_micros(1))
.build_associated::<Duration>()?
.docs(docstring! {
/// The duration of one microsecond.
///
/// # Examples
///
/// ```rune,no_run
/// use time::Duration;
///
/// let duration = Duration::MICROSECOND;
/// ```
})?;
module
.constant("NANOSECOND", Duration::from_nanos(1))
.build_associated::<Duration>()?
.docs(docstring! {
/// The duration of one nanosecond.
///
/// # Examples
///
/// ```rune,no_run
/// use time::Duration;
///
/// let duration = Duration::NANOSECOND;
/// ```
})?;
module
.constant("ZERO", Duration::from_nanos(0))
.build_associated::<Duration>()?
.docs(docstring! {
/// A duration of zero time.
///
/// # Examples
///
/// ```rune,no_run
/// use time::Duration;
///
/// let duration = Duration::ZERO;
/// ```
})?;
module
.constant("MAX", Duration::new(u64::MAX, NANOS_PER_SEC - 1))
.build_associated::<Duration>()?
.docs(docstring! {
/// The maximum duration.
///
/// # Examples
///
/// ```rune,no_run
/// use time::Duration;
///
/// let duration = Duration::MAX;
/// ```
})?;
*/

module
.function("tick", Interval::tick)
.build_associated::<Interval>()?;
Expand Down

0 comments on commit b68c00d

Please sign in to comment.