input-output-hk / input-output-hk/ce-netsim

Add duration parser

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Rust
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Implement a simple duration parser so that we can use human readable strings to configure time related settings:

- `2 ms` = `Duration::from_millis(2)`
- `2s` = `Duration::from_secs(2)`
- `2s 500ms` = `Duration::from_secs(2) + Duration::from_millis(500)`
- ...

The goal is to be able to set this in the `SimConfiguration` for the `idle_duration` time. And then to also use this for the edge _latency_.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate SimConfiguration and the existing idle_duration and edge-latency settings, then trace how their durations are currently represented. Use the examples in the issue as the acceptance cases: supported human-readable strings should produce the corresponding combined duration and be usable for both configuration points.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.