Make a DurationInSeconds function
Also, run clang-format on all the files I changed because I am too lazy
to figure out how to call clang-format on just the lines I changed.
Change-Id: I071c6f81dced533a0a269f25a258348132a7056a
diff --git a/y2014/autonomous/auto_main.cc b/y2014/autonomous/auto_main.cc
index d38e1e6..f125cc2 100644
--- a/y2014/autonomous/auto_main.cc
+++ b/y2014/autonomous/auto_main.cc
@@ -1,12 +1,12 @@
#include <stdio.h>
-#include "aos/time/time.h"
#include "aos/init.h"
#include "aos/logging/logging.h"
+#include "aos/time/time.h"
#include "frc971/autonomous/auto.q.h"
#include "y2014/autonomous/auto.h"
-int main(int /*argc*/, char * /*argv*/[]) {
+int main(int /*argc*/, char * /*argv*/ []) {
::aos::Init(-1);
LOG(INFO, "Auto main started\n");
@@ -28,9 +28,7 @@
auto elapsed_time = ::aos::monotonic_clock::now() - start_time;
LOG(INFO, "Auto mode exited in %f, waiting for it to finish.\n",
- ::std::chrono::duration_cast<::std::chrono::duration<double>>(
- elapsed_time)
- .count());
+ ::aos::time::DurationInSeconds(elapsed_time));
while (::frc971::autonomous::autonomous->run_auto) {
::frc971::autonomous::autonomous.FetchNextBlocking();
LOG(INFO, "Got another auto packet\n");
@@ -40,4 +38,3 @@
::aos::Cleanup();
return 0;
}
-