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) { ...@@ -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); 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); int status = Set(duration, ticks);
CheckExceptions(status, "Setting duration from seconds"); CheckExceptions(status, "Setting duration from seconds");
} }
...@@ -69,7 +71,8 @@ unsigned long long internal::Seconds::Max() { ...@@ -69,7 +71,8 @@ unsigned long long internal::Seconds::Max() {
return EMBB_DURATION_MAX_SECONDS; 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); return embb_duration_set_milliseconds(&duration, ticks);
} }
...@@ -79,7 +82,8 @@ void internal::Milliseconds::SetAndCheck( ...@@ -79,7 +82,8 @@ void internal::Milliseconds::SetAndCheck(
CheckExceptions(status, "Setting duration from milliseconds"); 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; unsigned long long ticks = 0;
int status = embb_duration_as_milliseconds(&duration, &ticks); int status = embb_duration_as_milliseconds(&duration, &ticks);
assert(status == EMBB_SUCCESS); assert(status == EMBB_SUCCESS);
...@@ -103,7 +107,8 @@ unsigned long long internal::Milliseconds::Max() { ...@@ -103,7 +107,8 @@ unsigned long long internal::Milliseconds::Max() {
#endif #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); return embb_duration_set_microseconds(&duration, ticks);
} }
...@@ -113,7 +118,8 @@ void internal::Microseconds::SetAndCheck( ...@@ -113,7 +118,8 @@ void internal::Microseconds::SetAndCheck(
CheckExceptions(status, "Setting duration from microseconds"); 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; unsigned long long ticks = 0;
int status = embb_duration_as_microseconds(&duration, &ticks); int status = embb_duration_as_microseconds(&duration, &ticks);
...@@ -139,7 +145,8 @@ unsigned long long internal::Microseconds::Max() { ...@@ -139,7 +145,8 @@ unsigned long long internal::Microseconds::Max() {
#endif #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); return embb_duration_set_nanoseconds(&duration, ticks);
} }
......
...@@ -32,9 +32,12 @@ namespace test { ...@@ -32,9 +32,12 @@ namespace test {
DurationTest::DurationTest() { DurationTest::DurationTest() {
CreateUnit("Seconds").Add(&DurationTest::Test<internal::Seconds>, this); CreateUnit("Seconds").Add(&DurationTest::Test<internal::Seconds>, this);
CreateUnit("Milliseconds").Add(&DurationTest::Test<internal::Milliseconds>, this); CreateUnit("Milliseconds").Add(&DurationTest::Test<internal::Milliseconds>,
CreateUnit("Microseconds").Add(&DurationTest::Test<internal::Microseconds>, this); this);
CreateUnit("Nanoseconds").Add(&DurationTest::Test<internal::Nanoseconds>, this); CreateUnit("Microseconds").Add(&DurationTest::Test<internal::Microseconds>,
this);
CreateUnit("Nanoseconds").Add(&DurationTest::Test<internal::Nanoseconds>,
this);
} }
} // namespace test } // 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