Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search




Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Can I get elapsed/remaining time over 1 hour in minutes?
« previous next »
  • Print
Pages: [1]

Author Topic: Can I get elapsed/remaining time over 1 hour in minutes?  (Read 1260 times)

Offline ThisBoxRox

  • Member
  • *
  • Posts: 2
Can I get elapsed/remaining time over 1 hour in minutes?
« on: November 27, 2017, 04:42:45 AM »
On the WPS, when the elapsed and/or remaining times for the current file are over an hour, can I get those times in MM:SS instead of HH:MM:SS?  For example, instead of 1:23:45, I want 83:45.

Alternately, is there a way to get the elapsed/remaining time in seconds and perform arithmetic on them to get what I'm after?

Thank you.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 460
Re: Can I get elapsed/remaining time over 1 hour in minutes?
« Reply #1 on: November 28, 2017, 12:29:40 AM »
I really can't think of a way thats built-in to the theme system I can show you what you need to edit in the actual rockbox code to get what you are after but you will need to make your own custom build to do it
Logged

Offline ThisBoxRox

  • Member
  • *
  • Posts: 2
Re: Can I get elapsed/remaining time over 1 hour in minutes?
« Reply #2 on: November 28, 2017, 04:24:32 PM »
That's what I figured.  Thank you.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 460
Re: Can I get elapsed/remaining time over 1 hour in minutes?
« Reply #3 on: November 28, 2017, 11:24:07 PM »
here is the time format function WPS uses:
https://github.com/Rockbox/rockbox/blob/master/apps/misc.c#L1077

at line 1080 change
unsigned long hours = time / 3600;
to..
unsigned long hours = 0;

and if you want it to display 00:00 then at line 1085 change
t < 0, "-", hours, hashours, ":", hashours+1, minutes, seconds);
to..
t < 0, "-", hours, hashours, ":", hashours+2, minutes, seconds);

Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Can I get elapsed/remaining time over 1 hour in minutes?
 

  • SMF 2.0.6 | SMF © 2013, Simple Machines
  • XHTML
  • RSS
  • WAP2

Page created in 0.056 seconds with 40 queries.