My Elma Project
An event loop manager for embedded systems
Main Page
Classes
Files
File List
All
Classes
Functions
src
off.cc
1
#include <iostream>
2
#include <chrono>
3
#include <vector>
4
5
#include "stopwatch.h"
6
7
using namespace
std::chrono
;
8
using namespace
elma
;
9
using namespace
stopwatch
;
10
11
StopWatch
& OffState:: stopwatch() {
return
(
StopWatch
&) state_machine(); }
12
13
void
OffState::exit(
const
Event& e) {
14
if
( e.name() ==
"start/stop"
) {
15
// User started the stopwatch
16
stopwatch
().begin();
17
}
else
if
( e.name() ==
"reset"
) {
18
// User rest the stopwatch
19
stopwatch
().reset();
20
}
21
}
stopwatch
Definition:
off.h:6
chrono
stopwatch::StopWatch
A stop watch class, that inherits from StateMachine.
Definition:
stopwatch.h:16
elma
Generated on Thu Mar 14 2019 18:49:22 for My Elma Project by
1.8.8