aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/QtPropertyBrowser/examples/demo/demo.pro
blob: 8e44044bd208bfef534fb3d2511920f9b70c580b (plain)
1
2
3
4
5
6
7
8
TEMPLATE = app
DEPENDPATH += .
INCLUDEPATH += .

include(../../src/qtpropertybrowser.pri)
# Input
SOURCES += main.cpp
RESOURCES += demo.qrc
f">timer_init(void) { timer_clear(); } void timer_clear(void) { last_systime = chVTGetSystemTime(); overflow = 0; current_time_ms = 0; } uint16_t timer_read(void) { return (uint16_t)timer_read32(); } uint32_t timer_read32(void) { // Note: We assume that the timer update is called at least once betweeen every wrap around of the system time systime_t current_systime = chVTGetSystemTime(); systime_t elapsed = current_systime - last_systime + overflow; uint32_t elapsed_ms = ST2MS(elapsed); current_time_ms += elapsed_ms; overflow = elapsed - MS2ST(elapsed_ms); last_systime = current_systime; return current_time_ms; } uint16_t timer_elapsed(uint16_t last) { return timer_read() - last; } uint32_t timer_elapsed32(uint32_t last) { return timer_read32() - last; }