mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
Remove unused utility function elapsed_time_to_str
git-svn-id: svn://localhost/ardour2/trunk@2398 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a87d7bfe27
commit
b821426d4a
2 changed files with 0 additions and 43 deletions
|
|
@ -32,7 +32,6 @@
|
||||||
|
|
||||||
class XMLNode;
|
class XMLNode;
|
||||||
|
|
||||||
void elapsed_time_to_str (char *buf, uint32_t seconds);
|
|
||||||
Glib::ustring legalize_for_path (Glib::ustring str);
|
Glib::ustring legalize_for_path (Glib::ustring str);
|
||||||
std::ostream& operator<< (std::ostream& o, const ARDOUR::BBT_Time& bbt);
|
std::ostream& operator<< (std::ostream& o, const ARDOUR::BBT_Time& bbt);
|
||||||
XMLNode* find_named_node (const XMLNode& node, std::string name);
|
XMLNode* find_named_node (const XMLNode& node, std::string name);
|
||||||
|
|
|
||||||
|
|
@ -49,48 +49,6 @@ using namespace std;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
using Glib::ustring;
|
using Glib::ustring;
|
||||||
|
|
||||||
void
|
|
||||||
elapsed_time_to_str (char *buf, uint32_t seconds)
|
|
||||||
|
|
||||||
{
|
|
||||||
uint32_t days;
|
|
||||||
uint32_t hours;
|
|
||||||
uint32_t minutes;
|
|
||||||
uint32_t s;
|
|
||||||
|
|
||||||
s = seconds;
|
|
||||||
days = s / (3600 * 24);
|
|
||||||
s -= (days * 3600 * 24);
|
|
||||||
hours = s / 3600;
|
|
||||||
s -= (hours * 3600);
|
|
||||||
minutes = s / 60;
|
|
||||||
s -= minutes * 60;
|
|
||||||
|
|
||||||
if (days) {
|
|
||||||
snprintf (buf, sizeof (buf), "%" PRIu32 " day%s %" PRIu32 " hour%s",
|
|
||||||
days,
|
|
||||||
days > 1 ? "s" : "",
|
|
||||||
hours,
|
|
||||||
hours > 1 ? "s" : "");
|
|
||||||
} else if (hours) {
|
|
||||||
snprintf (buf, sizeof (buf), "%" PRIu32 " hour%s %" PRIu32 " minute%s",
|
|
||||||
hours,
|
|
||||||
hours > 1 ? "s" : "",
|
|
||||||
minutes,
|
|
||||||
minutes > 1 ? "s" : "");
|
|
||||||
} else if (minutes) {
|
|
||||||
snprintf (buf, sizeof (buf), "%" PRIu32 " minute%s",
|
|
||||||
minutes,
|
|
||||||
minutes > 1 ? "s" : "");
|
|
||||||
} else if (s) {
|
|
||||||
snprintf (buf, sizeof (buf), "%" PRIu32 " second%s",
|
|
||||||
seconds,
|
|
||||||
seconds > 1 ? "s" : "");
|
|
||||||
} else {
|
|
||||||
snprintf (buf, sizeof (buf), "no time");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ustring
|
ustring
|
||||||
legalize_for_path (ustring str)
|
legalize_for_path (ustring str)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue