1
0
Fork 0
forked from len0rd/rockbox

A few more bookmark code tweaks. Also improves how the bookmark selection screen is displayed on Archos players.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12350 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Magnus Holmgren 2007-02-17 13:36:44 +00:00
parent 471d881979
commit 14ba91eaa9
6 changed files with 67 additions and 107 deletions

View file

@ -186,6 +186,27 @@ char *create_numbered_filename(char *buffer, const char *path,
return buffer;
}
/* Format time into buf.
*
* buf - buffer to format to.
* buf_size - size of buffer.
* t - time to format, in milliseconds.
*/
void format_time(char* buf, int buf_size, long t)
{
if ( t < 3600000 )
{
snprintf(buf, buf_size, "%d:%02d",
(int) (t / 60000), (int) (t % 60000 / 1000));
}
else
{
snprintf(buf, buf_size, "%d:%02d:%02d",
(int) (t / 3600000), (int) (t % 3600000 / 60000),
(int) (t % 60000 / 1000));
}
}
#ifdef CONFIG_RTC
/* Create a filename with a date+time part.
It is allowed that buffer and path point to the same memory location,