]> git.tdb.fi Git - libs/core.git/blobdiff - source/time/utils.cpp
Added DateTime
[libs/core.git] / source / time / utils.cpp
index d6b63328a32d32a3519da8f6dd0bd20b093e602e..ad0d24550338f7c22117057a2354d42f93e6c09e 100644 (file)
@@ -9,11 +9,14 @@ Distributed under the LGPL
 #include <sys/resource.h>
 #include <sys/time.h>
 #endif
+#include "datetime.h"
 #include "timedelta.h"
 #include "timestamp.h"
 #include "units.h"
 #include "utils.h"
 
+using namespace std;
+
 namespace Msp {
 namespace Time {
 
@@ -50,6 +53,11 @@ TimeStamp now()
 #endif
 }
 
+string format_now(const string &fmt)
+{
+       return DateTime(now()).format(fmt);
+}
+
 /**
 Returns the CPU time used by the program so far.
 */