获取下个时间戳前暂停1ms
This commit is contained in:
3
Rust/source/.gitignore
vendored
3
Rust/source/.gitignore
vendored
@@ -27,6 +27,7 @@ bld/
|
||||
**/.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
.vscode
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
@@ -254,4 +255,4 @@ paket-files/
|
||||
target/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.DS_Store,
|
||||
|
||||
@@ -270,6 +270,8 @@ impl SnowWorkerM1 {
|
||||
let mut tempTimeTicker = self.GetCurrentTimeTick();
|
||||
|
||||
while tempTimeTicker <= self._LastTimeTick {
|
||||
// 暂停1ms
|
||||
sleep(std::time::Duration::from_millis(1));
|
||||
tempTimeTicker = self.GetCurrentTimeTick();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user