forked from len0rd/rockbox
long policy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5932 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8758713f84
commit
6e2a8a004d
1 changed files with 4 additions and 3 deletions
|
@ -237,14 +237,15 @@ bool wps_load(const char* file, bool display)
|
||||||
* buf_size - size of buffer.
|
* buf_size - size of buffer.
|
||||||
* time - time to format, in milliseconds.
|
* time - time to format, in milliseconds.
|
||||||
*/
|
*/
|
||||||
static void format_time(char* buf, int buf_size, int time)
|
static void format_time(char* buf, int buf_size, long time)
|
||||||
{
|
{
|
||||||
if ( time < 3600000 ) {
|
if ( time < 3600000 ) {
|
||||||
snprintf(buf, buf_size, "%d:%02d",
|
snprintf(buf, buf_size, "%d:%02d",
|
||||||
time % 3600000 / 60000, time % 60000 / 1000);
|
(int) (time % 3600000 / 60000), (int) (time % 60000 / 1000));
|
||||||
} else {
|
} else {
|
||||||
snprintf(buf, buf_size, "%d:%02d:%02d",
|
snprintf(buf, buf_size, "%d:%02d:%02d",
|
||||||
time / 3600000, time % 3600000 / 60000, time % 60000 / 1000);
|
(int) (time / 3600000), (int) (time % 3600000 / 60000),
|
||||||
|
(int) (time % 60000 / 1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue