empty loop {}
wastes CPU cycles
This commit is contained in:
parent
c7d9140362
commit
c38375cb88
2 changed files with 6 additions and 2 deletions
|
@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||
<!-- next-header -->
|
||||
|
||||
## [Unreleased]
|
||||
### CLI
|
||||
- fix: empty `loop {}` wastes CPU cycles
|
||||
|
||||
## [0.1.0] - 2022-02-13
|
||||
### CLI
|
||||
|
|
|
@ -8,7 +8,7 @@ use discord_rich_presence::{
|
|||
};
|
||||
use std::{
|
||||
process::exit,
|
||||
time::{SystemTime, UNIX_EPOCH},
|
||||
time::{Duration, SystemTime, UNIX_EPOCH},
|
||||
vec,
|
||||
};
|
||||
|
||||
|
@ -121,5 +121,7 @@ fn main() {
|
|||
"Press Ctrl+C to exit!".magenta()
|
||||
);
|
||||
|
||||
loop {}
|
||||
loop {
|
||||
std::thread::sleep(Duration::new(9999999, 9999999));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue