mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
bound sampler buffer
This commit is contained in:
parent
fcd6beb608
commit
0780298b80
8 changed files with 36 additions and 18 deletions
|
@ -30,11 +30,15 @@ fn test_sampler() {
|
|||
);
|
||||
|
||||
const RATE: u64 = 10;
|
||||
const MAX_DURATION: u64 = 10;
|
||||
sampler_sender
|
||||
.send(SamplerControlMsg::Enable(Duration::from_millis(RATE)))
|
||||
.send(SamplerControlMsg::Enable(
|
||||
Duration::from_millis(RATE),
|
||||
Duration::from_secs(MAX_DURATION),
|
||||
))
|
||||
.unwrap();
|
||||
|
||||
thread::sleep(Duration::from_millis(30));
|
||||
thread::sleep(Duration::from_millis(100));
|
||||
|
||||
sampler_sender.send(SamplerControlMsg::Disable).unwrap();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue