Logging improvements to allow prettier displays in the server GUI.
[dcpomatic.git] / src / lib / timer.cc
index a45e80dcb0bdb46e9fe03b58459b0bd485c8cc5e..42f1cb350d5c9931caa771d1700d47273909145d 100644 (file)
@@ -26,6 +26,8 @@
 #include "timer.h"
 #include "util.h"
 
+#include "i18n.h"
+
 using namespace std;
 
 /** @param n Name to use when giving output */
@@ -40,7 +42,7 @@ PeriodTimer::~PeriodTimer ()
 {
        struct timeval stop;
        gettimeofday (&stop, 0);
-       cout << "T: " << _name << ": " << (seconds (stop) - seconds (_start)) << "\n";
+       cout << N_("T: ") << _name << N_(": ") << (seconds (stop) - seconds (_start)) << N_("\n");
 }
 
 /** @param n Name to use when giving output.
@@ -79,11 +81,11 @@ StateTimer::~StateTimer ()
                return;
        }
 
-       
-       set_state ("");
 
-       cout << _name << ":\n";
+       set_state (N_(""));
+
+       cout << _name << N_(":\n");
        for (map<string, double>::iterator i = _totals.begin(); i != _totals.end(); ++i) {
-               cout << "\t" << i->first << " " << i->second << "\n";
+               cout << N_("\t") << i->first << " " << i->second << N_("\n");
        }
 }