ETrobocon2017 - 片山研究所モデルベース開発推進事業部
str
ev3-api
library
libcpp-ev3
include
Clock.h
[詳解]
1
//
2
// Clock.h
3
//
4
// Copyright (c) 2015-2016 Embedded Technology Software Design Robot Contest
5
//
6
7
#ifndef EV3CPPAPI_CLOCK_H_
8
#define EV3CPPAPI_CLOCK_H_
9
10
#include "ev3api.h"
11
12
namespace
ev3api
{
16
class
Clock
17
{
18
public
:
25
Clock
(
void
);
26
33
void
reset
(
void
);
34
41
uint32_t
now
(
void
)
const
;
42
48
inline
void
wait
(uint32_t duration)
49
{
50
dly_tsk(duration);
51
}
52
58
inline
void
sleep
(uint32_t duration)
59
{
60
tslp_tsk(duration);
61
}
62
63
protected
:
69
static
uint32_t
getTim
();
70
71
private
:
72
uint32_t mStartClock;
73
};
// class Clock
74
}
// namespace ev3api
75
76
#endif // !EV3CPPAPI_CLOCK_H_
ev3api
Definition:
Clock.h:12
ev3api::Clock::Clock
Clock(void)
Definition:
Clock.cpp:13
ev3api::Clock::now
uint32_t now(void) const
Definition:
Clock.cpp:26
ev3api::Clock::getTim
static uint32_t getTim()
Definition:
Clock.cpp:31
ev3api::Clock::sleep
void sleep(uint32_t duration)
Definition:
Clock.h:58
ev3api::Clock::reset
void reset(void)
Definition:
Clock.cpp:19
ev3api::Clock
Definition:
Clock.h:16
ev3api::Clock::wait
void wait(uint32_t duration)
Definition:
Clock.h:48
構築:
1.8.13