mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Use a real timer
This commit is contained in:
parent
f84067889b
commit
9bcf66e7a2
1 changed files with 1 additions and 8 deletions
|
@ -4,13 +4,6 @@ import azure::bindgen::*;
|
|||
import azure::cairo;
|
||||
import azure::cairo::bindgen::*;
|
||||
|
||||
// FIXME: Busy wait hack
|
||||
fn sleep() {
|
||||
iter::repeat(100000u) {||
|
||||
task::yield();
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// The platform event handler thread
|
||||
let osmain_ch = osmain::osmain();
|
||||
|
@ -36,7 +29,7 @@ fn main() {
|
|||
};
|
||||
comm::send(draw_ch, gfx::compositor::draw(model));
|
||||
|
||||
sleep();
|
||||
std::timer::sleep(100u);
|
||||
|
||||
x1 += 1;
|
||||
y1 += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue