Added utils

This commit is contained in:
Dmitriy Shishkov 2022-04-17 11:40:32 +03:00
parent ef90850b40
commit 34f08a4e0b
No known key found for this signature in database
GPG Key ID: 14358F96FCDD8060
2 changed files with 23 additions and 0 deletions

13
utils.cpp Normal file
View File

@ -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);
}

10
utils.h Normal file
View File

@ -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