1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#[cfg(not(feature = "enable-runtime-benchmarking"))]
#[macro_export]
macro_rules! start_bench {
($stopwatch_path:ident, $name:ident) => {};
}
#[cfg(not(feature = "enable-runtime-benchmarking"))]
#[macro_export]
macro_rules! end_bench {
($name:expr) => {};
}
#[cfg(feature = "enable-runtime-benchmarking")]
#[macro_export]
macro_rules! start_bench {
($stopwatch_path:ident, $name:ident) => {
let $name = $stopwatch_path::Stopwatch::start_new();
};
}
#[cfg(feature = "enable-runtime-benchmarking")]
#[macro_export]
macro_rules! end_bench {
($name:ident) => {
let dur = $name.elapsed();
let s = dur.as_secs();
let mut us = dur.subsec_micros();
let ms = us / 1000;
us -= ms * 1000;
println!("'{}' took {}s {}ms {}us", stringify!($name), s, ms, us);
};
}
#[cfg(feature = "framebuffer-types")]
#[macro_use(io, ioc, iow, iowr)]
extern crate ioctl_gen;
pub use cgmath;
#[cfg(feature = "input")]
pub use epoll;
#[cfg(feature = "input")]
pub use evdev;
#[cfg(feature = "image")]
pub use image;
#[cfg(feature = "framebuffer-drawing")]
pub use line_drawing;
#[cfg(feature = "enable-runtime-benchmarking")]
pub use stopwatch;
#[cfg(feature = "framebuffer-types")]
pub mod framebuffer;
#[cfg(feature = "input-types")]
pub mod input;
pub mod dimensions;
#[cfg(feature = "battery")]
pub mod battery;
pub mod device;
#[cfg(feature = "appctx")]
pub mod appctx;
#[cfg(feature = "appctx")]
pub mod ui_extensions;