Hello this is me again
I was considering to add so PS to my previoous issue and then though it would be better on a different topic.
the current constructors of Interval are at the moment
Interval::new - initialize with a duration and a start instant
Interval::new_interval - with duration and current instant as start instant. The name isn't much clear but redundant with its struct name
what about renaming the constructors to:
Interval::new(Duration) - initialize with a duration and current instant as start instant.
Having new with only the duration argument makes it more similar to other interval implementations (egg from tokio or std)
Interval::at(Instant, Duration) or Interval::starting or Interval::new_starting - initialize with a duration and a start instant.
Since this feature is less common in other implementations, this constructor has a specific name
As a user I think it could be more intuitive and comfortable, what do you think ?
Hello this is me again
I was considering to add so PS to my previoous issue and then though it would be better on a different topic.
the current constructors of
Intervalare at the momentInterval::new- initialize with a duration and a start instantInterval::new_interval- with duration and current instant as start instant. The name isn't much clear but redundant with its struct namewhat about renaming the constructors to:
Interval::new(Duration)- initialize with a duration and current instant as start instant.Having new with only the duration argument makes it more similar to other interval implementations (egg from tokio or std)
Interval::at(Instant, Duration)orInterval::startingorInterval::new_starting- initialize with a duration and a start instant.Since this feature is less common in other implementations, this constructor has a specific name
As a user I think it could be more intuitive and comfortable, what do you think ?