[go: up one dir, main page]

pistoncore-input 1.0.1

A structure for user input
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(test)]

extern crate input;
extern crate test;

use input::{Button, Input, Key, PressEvent};
use test::Bencher;

#[bench]
fn bench_input_press(bencher: &mut Bencher) {
    let e = Input::Press(Button::Keyboard(Key::S));
    let button = Button::Keyboard(Key::A);
    bencher.iter(|| {
        let _: Option<Input> = PressEvent::from_button(button, &e);
    });
}