mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-26 23:24:20 +02:00
Added const to make rate switching in the future easier.
This commit is contained in:
parent
b5cacb3e2e
commit
674de1a2d4
16
TODO.md
16
TODO.md
@ -22,9 +22,7 @@ Note this will probably migrate to GitHub's native Issues; this was mostly for p
|
|||||||
|
|
||||||
## After making public
|
## After making public
|
||||||
|
|
||||||
- Consider bumping up the refresh rate to 3000?
|
- Scrolling support for temp/disk
|
||||||
|
|
||||||
- Arrow keys for lists. This is a priority!
|
|
||||||
|
|
||||||
- Travis
|
- Travis
|
||||||
|
|
||||||
@ -46,18 +44,8 @@ Note this will probably migrate to GitHub's native Issues; this was mostly for p
|
|||||||
|
|
||||||
- Remove any `unwrap()`, ensure no crashing! Might have to use this: <https://doc.rust-lang.org/std/panic/fn.catch_unwind.html>
|
- Remove any `unwrap()`, ensure no crashing! Might have to use this: <https://doc.rust-lang.org/std/panic/fn.catch_unwind.html>
|
||||||
|
|
||||||
- Scrolling event in lists
|
|
||||||
|
|
||||||
- Switching between panels
|
|
||||||
|
|
||||||
- Truncate columns if needed for tables
|
- Truncate columns if needed for tables
|
||||||
|
|
||||||
- Test for Windows support, mac support, other. May be doable, depends on sysinfo and how much I know about other OSes probably.
|
|
||||||
|
|
||||||
- Seems like the braille symbols are borked on windows.
|
|
||||||
|
|
||||||
- Issue with typing after windows version runs!
|
|
||||||
|
|
||||||
- Efficiency!!!
|
- Efficiency!!!
|
||||||
|
|
||||||
- Filtering in processes (that is, allow searching)
|
- Filtering in processes (that is, allow searching)
|
||||||
@ -66,6 +54,4 @@ Note this will probably migrate to GitHub's native Issues; this was mostly for p
|
|||||||
|
|
||||||
- Modularity
|
- Modularity
|
||||||
|
|
||||||
- ~~Potentially process managing? Depends on the libraries...~~ Done on Linux!
|
|
||||||
|
|
||||||
- Probably good to add a "are you sure" to dd-ing...
|
- Probably good to add a "are you sure" to dd-ing...
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
// TODO: Store like three minutes of data, then change how much is shown based on scaling!
|
// TODO: Store like three minutes of data, then change how much is shown based on scaling!
|
||||||
pub const STALE_MAX_MILLISECONDS : u64 = 60 * 1000; // We wish to store at most 60 seconds worth of data. This may change in the future, or be configurable.
|
pub const STALE_MAX_MILLISECONDS : u64 = 60 * 1000; // We wish to store at most 60 seconds worth of data. This may change in the future, or be configurable.
|
||||||
pub const TICK_RATE_IN_MILLISECONDS : u64 = 200; // We use this as it's a good value to work with.
|
pub const TICK_RATE_IN_MILLISECONDS : u64 = 200; // We use this as it's a good value to work with.
|
||||||
|
pub const DEFAULT_REFRESH_RATE_IN_MILLISECONDS : u128 = 1000;
|
||||||
|
10
src/main.rs
10
src/main.rs
@ -56,7 +56,15 @@ fn main() -> error::Result<()> {
|
|||||||
//.after_help("Themes:") // TODO: This and others disabled for now
|
//.after_help("Themes:") // TODO: This and others disabled for now
|
||||||
.get_matches();
|
.get_matches();
|
||||||
|
|
||||||
let update_rate_in_milliseconds : u128 = matches.value_of("RATE_MILLIS").unwrap_or("1000").parse::<u128>()?;
|
let update_rate_in_milliseconds : u128 = if matches.is_present("RATE_MILLIS") {
|
||||||
|
matches
|
||||||
|
.value_of("RATE_MILLIS")
|
||||||
|
.unwrap_or(&constants::DEFAULT_REFRESH_RATE_IN_MILLISECONDS.to_string())
|
||||||
|
.parse::<u128>()?
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
constants::DEFAULT_REFRESH_RATE_IN_MILLISECONDS
|
||||||
|
};
|
||||||
|
|
||||||
if update_rate_in_milliseconds < 250 {
|
if update_rate_in_milliseconds < 250 {
|
||||||
return Err(RustopError::InvalidArg {
|
return Err(RustopError::InvalidArg {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user