Commit 545f342a by Bernhard Gatzhammer

Improved codestyle by obeying max characters per line

EMBB-422
parent 64f0de32
......@@ -44,11 +44,13 @@ void internal::Tick::CheckExceptions(int status, const char* msg) {
}
}
int internal::Seconds::Set(embb_duration_t& duration, unsigned long long ticks) {
int internal::Seconds::Set(embb_duration_t& duration,
unsigned long long ticks) {
return embb_duration_set_seconds(&duration, ticks);
}
void internal::Seconds::SetAndCheck(embb_duration_t& duration, unsigned long long ticks) {
void internal::Seconds::SetAndCheck(embb_duration_t& duration,
unsigned long long ticks) {
int status = Set(duration, ticks);
CheckExceptions(status, "Setting duration from seconds");
}
......@@ -69,7 +71,8 @@ unsigned long long internal::Seconds::Max() {
return EMBB_DURATION_MAX_SECONDS;
}
int internal::Milliseconds::Set(embb_duration_t& duration, unsigned long long ticks) {
int internal::Milliseconds::Set(embb_duration_t& duration,
unsigned long long ticks) {
return embb_duration_set_milliseconds(&duration, ticks);
}
......@@ -79,7 +82,8 @@ void internal::Milliseconds::SetAndCheck(
CheckExceptions(status, "Setting duration from milliseconds");
}
unsigned long long internal::Milliseconds::Get(const embb_duration_t& duration) {
unsigned long long internal::Milliseconds::Get(
const embb_duration_t& duration) {
unsigned long long ticks = 0;
int status = embb_duration_as_milliseconds(&duration, &ticks);
assert(status == EMBB_SUCCESS);
......@@ -103,7 +107,8 @@ unsigned long long internal::Milliseconds::Max() {
#endif
}
int internal::Microseconds::Set(embb_duration_t& duration, unsigned long long ticks) {
int internal::Microseconds::Set(embb_duration_t& duration,
unsigned long long ticks) {
return embb_duration_set_microseconds(&duration, ticks);
}
......@@ -113,7 +118,8 @@ void internal::Microseconds::SetAndCheck(
CheckExceptions(status, "Setting duration from microseconds");
}
unsigned long long internal::Microseconds::Get(const embb_duration_t& duration) {
unsigned long long internal::Microseconds::Get(
const embb_duration_t& duration) {
unsigned long long ticks = 0;
int status = embb_duration_as_microseconds(&duration, &ticks);
......@@ -139,7 +145,8 @@ unsigned long long internal::Microseconds::Max() {
#endif
}
int internal::Nanoseconds::Set(embb_duration_t& duration, unsigned long long ticks) {
int internal::Nanoseconds::Set(embb_duration_t& duration,
unsigned long long ticks) {
return embb_duration_set_nanoseconds(&duration, ticks);
}
......
......@@ -32,9 +32,12 @@ namespace test {
DurationTest::DurationTest() {
CreateUnit("Seconds").Add(&DurationTest::Test<internal::Seconds>, this);
CreateUnit("Milliseconds").Add(&DurationTest::Test<internal::Milliseconds>, this);
CreateUnit("Microseconds").Add(&DurationTest::Test<internal::Microseconds>, this);
CreateUnit("Nanoseconds").Add(&DurationTest::Test<internal::Nanoseconds>, this);
CreateUnit("Milliseconds").Add(&DurationTest::Test<internal::Milliseconds>,
this);
CreateUnit("Microseconds").Add(&DurationTest::Test<internal::Microseconds>,
this);
CreateUnit("Nanoseconds").Add(&DurationTest::Test<internal::Nanoseconds>,
this);
}
} // namespace test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment