diff --git a/utils.cpp b/utils.cpp new file mode 100644 index 0000000..6649a68 --- /dev/null +++ b/utils.cpp @@ -0,0 +1,13 @@ +#include "utils.h" + +wxString LTimeToStr(int time) { + return wxString::Format(_("%d:%02d:%02d"), time / 3600, (time / 60) % 60, time % 60); +} + +int upDiv(int a, int b) { + return a / b + ((a % b) ? 1 : 0); +} + +wxString itowxS(int a) { + return wxString::Format("%i", a); +} \ No newline at end of file diff --git a/utils.h b/utils.h new file mode 100644 index 0000000..dff6caa --- /dev/null +++ b/utils.h @@ -0,0 +1,10 @@ +#ifndef UTILS_H +#define UTILS_H + +#include "wxw.h" + +wxString LTimeToStr(int time); +int upDiv(int a, int b); +wxString itowxS(int a); + +#endif \ No newline at end of file